Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Capturing Keyboard Input in a Dialog Based Appliaction Pin
*Dreamz7-Nov-05 18:51
*Dreamz7-Nov-05 18:51 
GeneralRe: Capturing Keyboard Input in a Dialog Based Appliaction Pin
pani687-Nov-05 22:18
pani687-Nov-05 22:18 
GeneralRe: Capturing Keyboard Input in a Dialog Based Appliaction Pin
*Dreamz7-Nov-05 23:28
*Dreamz7-Nov-05 23:28 
AnswerRe: Capturing Keyboard Input in a Dialog Based Appliaction Pin
ThatsAlok7-Nov-05 21:51
ThatsAlok7-Nov-05 21:51 
GeneralRe: Capturing Keyboard Input in a Dialog Based Appliaction Pin
pani687-Nov-05 22:23
pani687-Nov-05 22:23 
GeneralRe: Capturing Keyboard Input in a Dialog Based Appliaction Pin
ThatsAlok7-Nov-05 22:54
ThatsAlok7-Nov-05 22:54 
QuestionSwitch Desktop Pin
Nishad S7-Nov-05 17:59
Nishad S7-Nov-05 17:59 
QuestionDumb Puzzling CFileDialog Error Pin
LighthouseJ7-Nov-05 17:04
LighthouseJ7-Nov-05 17:04 
I have this code:
DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;<br />
static char BASED_CODE szFilter [] = _T("All Files (*.*)|*.*||");<br />
CFileDialog dlg (false, _T(".*"), _T(""), dwFlags, szFilter, (CWnd *) this, sizeof(OPENFILENAME));<br />
<br />
if (dlg.DoModal() == IDOK) {<br />
   // do work here<br />
}


For some reason, when it reaches the DoModal, it bails without showing a dialog and I used the GetDlgExtendedError function to find out and it throws an error called CDERR_DIALOGFAILURE which says

The dialog box could not be created. The common dialog box function's call to the DialogBox function failed. For example, this error occurs if the common dialog box call specifies an invalid window handle.


I use these same file dialogs elsewhere in the same project and copied and pasted the code and the those dialogs work fine, but this one refuses. I can step through and the window handle is indeed invalid but I don't know why. I'm doing it the exact same here as I am in the other location but it doesn't work here for some reason. Is the problem in front of my face and I am just not seeing what's wrong?
AnswerRe: Dumb Puzzling CFileDialog Error Pin
Bob Ciora8-Nov-05 1:25
Bob Ciora8-Nov-05 1:25 
GeneralRe: Dumb Puzzling CFileDialog Error Pin
LighthouseJ8-Nov-05 5:25
LighthouseJ8-Nov-05 5:25 
QuestionError 10091 in socket program Pin
vani_bel7-Nov-05 16:38
vani_bel7-Nov-05 16:38 
AnswerRe: Error 10091 in socket program Pin
John R. Shaw7-Nov-05 17:37
John R. Shaw7-Nov-05 17:37 
QuestionSystem menu and Notify Icon Menu Pin
Nibu babu thomas7-Nov-05 16:36
Nibu babu thomas7-Nov-05 16:36 
AnswerRe: System menu and Notify Icon Menu Pin
douglasjordan7-Nov-05 17:56
douglasjordan7-Nov-05 17:56 
QuestionDirectShow release of GraphBuilder Pin
douglasjordan7-Nov-05 15:44
douglasjordan7-Nov-05 15:44 
QuestionHexadecimal editor Pin
samkook7-Nov-05 15:02
samkook7-Nov-05 15:02 
AnswerRe: Hexadecimal editor Pin
Christian Graus7-Nov-05 15:07
protectorChristian Graus7-Nov-05 15:07 
AnswerRe: Hexadecimal editor Pin
Chris Losinger7-Nov-05 15:11
professionalChris Losinger7-Nov-05 15:11 
AnswerRe: Hexadecimal editor Pin
John R. Shaw7-Nov-05 15:55
John R. Shaw7-Nov-05 15:55 
GeneralRe: Hexadecimal editor Pin
samkook7-Nov-05 16:10
samkook7-Nov-05 16:10 
GeneralRe: Hexadecimal editor Pin
John R. Shaw7-Nov-05 17:06
John R. Shaw7-Nov-05 17:06 
AnswerRe: Hexadecimal editor Pin
LighthouseJ7-Nov-05 17:10
LighthouseJ7-Nov-05 17:10 
GeneralRe: Hexadecimal editor Pin
John R. Shaw7-Nov-05 17:49
John R. Shaw7-Nov-05 17:49 
AnswerRe: Hexadecimal editor Pin
samkook7-Nov-05 18:29
samkook7-Nov-05 18:29 
QuestionRemove all breakpoint Pin
bobi_zcl7-Nov-05 13:42
bobi_zcl7-Nov-05 13:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.