Hi All,
Last 20 days i spend my every morning to solved this exception but i can't get it.
Before i asked my question, let me inform you about my plateform of developement
1)Operating System:-Window 2003 server edition<br />
2)Microsoft visual studio 2003<br />
3)MFC Dialog based Application
______________________________________________________________________
Now,
I have one utility that take Three file from user as input.
1)BIL OF MATERIAL<br />
2)SALES PLAN<br />
3)MRP DETAILS
And on the basis of this file i genarate A Master file.
Concept working so far fine but as i allows user to enter 3 file.
so, I ask the user to select file from a CFileDialog.
There are 3 edit box and 3 browse button to do so.
Now,
When i select first file with file dailog say BIL_1.csv(*.CSV Excel file format)
File selected correctly.
But next time i click another Browse button another file dialog opens allows user to select next file but while selecting next file if my focus goes on BIL_1.csv(Previously selected file).
then instead of showing TOOLTIP text a
UNHADLE EXCEPTION Came.
Unhadled Exception at 0x7c95a8ad in sapUtility.exe 0xC0000005:Access violation reading location 0x010f3850
SapUtility.exe is my project name.
A on click of break.
7C95A8A7 mov eax,dword ptr[eax+1C4H]<br />
7C95A8d mov eax,dword ptr[eax]<br />
and value of eax is 17774672
__________________________________________________________________
NOTE:-
1)This happen when i select files from DESKTOP.there is lots of shortcuts.
2)This happen only with .csv files utill now.
3)This happen for Tool Tip text shown
4)I dont known this may be very confusing question.
5)May be microsoft BUG.
6)Please review my previous post.
MFC Error: CFileDailog Error of 0x7c95a8ad type exception[
^]
________________________________________________________
[EDIT] FOR CODE:
void CSApUtiliy::OnBnClickedButton1()
{
CFileDialog InputFile_BOM(TRUE,"CSV","*.CSV",OF_HIDEREADONLY|OFN_PATHMUSTEXIST,"csv Files(*.csv)|*.csv|All files(*.*)|*.*||",this);
CEdit* Input_FileText=(CEdit*)GetDlgItem(ID_EDIT2);
if(InputFile_BOM.DoModel()==IDOK)
{
CString PathName=InputFile_BOM.GetPathName();
Input_FileText.SetWindowText(PathName);
}
}
And For Next Button
void CSApUtiliy::OnBnClickedButton2()
{
CFileDialog InputFile_Sale(TRUE,"CSV","*.CSV",OF_HIDEREADONLY|OFN_PATHMUSTEXIST,"csv Files(*.csv)|*.csv|All files(*.*)|*.*||",this);
CEdit* Input_FileText=(CEdit*)GetDlgItem(ID_EDIT1);
if(InputFile_Sale.DoModel()==IDOK)
{
CString PathName=InputFile_Sale.GetPathName();
Input_FileText.SetWindowText(PathName);
}
}
__________________________________________________________________
Surly microsoft BUG??
But want solution
All helps are grealty apretiate.