DoModal returns -1
-
Hai All, In my application InitInstance method the DoModal() calling of main application dialog return -1(bcoz of some loading problem). but i want to capture it and show some error mesage. But i cann't show any error message or any other dialog when it returns -1. How i can i solve this problem. ANyone can have any idea? regards Ans
-
Hai All, In my application InitInstance method the DoModal() calling of main application dialog return -1(bcoz of some loading problem). but i want to capture it and show some error mesage. But i cann't show any error message or any other dialog when it returns -1. How i can i solve this problem. ANyone can have any idea? regards Ans
-
Hai All, In my application InitInstance method the DoModal() calling of main application dialog return -1(bcoz of some loading problem). but i want to capture it and show some error mesage. But i cann't show any error message or any other dialog when it returns -1. How i can i solve this problem. ANyone can have any idea? regards Ans
AnsGe wrote: But i cann't show any error message or any other dialog when it returns -1. The reason is most likely here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
AnsGe wrote: But i cann't show any error message or any other dialog when it returns -1. The reason is most likely here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Hai, I tried with ur help. But my problem still remains. If main window is successfully loaded then it is possible to show any mesagebox. But the main window Domodal() failed then it is not possible to show a MessageBox. The code snip running, but windows are not visible Thanks Anish
-
Hai All, In my application InitInstance method the DoModal() calling of main application dialog return -1(bcoz of some loading problem). but i want to capture it and show some error mesage. But i cann't show any error message or any other dialog when it returns -1. How i can i solve this problem. ANyone can have any idea? regards Ans
Whenever I've had
DoModal()
return -1 it was due to the dialog using a control whose window class wasn't registered yet. If you're running an older OS and are using any Win 95 common controls, check that you're callingInitCommonControls()
in your init code. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb -
Whenever I've had
DoModal()
return -1 it was due to the dialog using a control whose window class wasn't registered yet. If you're running an older OS and are using any Win 95 common controls, check that you're callingInitCommonControls()
in your init code. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb -
Hai, I tried with ur help. But my problem still remains. If main window is successfully loaded then it is possible to show any mesagebox. But the main window Domodal() failed then it is not possible to show a MessageBox. The code snip running, but windows are not visible Thanks Anish
AnsGe wrote: ...then it is not possible to show a MessageBox. Did you comment out the
m_pMainWnd = &dlg
statement in the app'sInitInstance()
method?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow