-
April 29th, 2004, 01:37 AM
#1
the CFileDialog in a dialog's OnCommand() cause the program crash
I want to use a CFileDialog in my dialog's OnCommand() function
like this:
int nCommandId = wParam & 0x0000FFFF;
switch(nCommandId)
{
case ID_BUTTON:
{
CFileDialog dlg(true,NULL,"*.ico",OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, _T("*.ico"));
if(dlg.DoModal()==IDOK)
{
//doing something
}
}
}
return CDialog::OnCommand(wParam, lParam);
but when i open a file and then close my dialog,the whole programe crashs ,why ?
-
April 29th, 2004, 02:43 AM
#2
1. It is not clear what "the whole programe crashs " means
2. take a look at this thread
-
April 29th, 2004, 06:31 AM
#3
VictorN
thank you ,I've soved this problem,it's seems that the CFileDialog
change the current path
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|