problem in InitInstance
-
Hi everybody I don't understand why this morning when i tried to start my dialog based application, the message box has opened with the following message: Uhandled exception in Fractal_v1_0.exe:0xC000005: Access Violation So i've found that this problem comes from the following line of code in the function InitInstance: m_pMainWnd=&Dlg; The big problem is that my application used to run before, so is anybody could explain me where could this problem come? Thanks in advance gerald
-
Hi everybody I don't understand why this morning when i tried to start my dialog based application, the message box has opened with the following message: Uhandled exception in Fractal_v1_0.exe:0xC000005: Access Violation So i've found that this problem comes from the following line of code in the function InitInstance: m_pMainWnd=&Dlg; The big problem is that my application used to run before, so is anybody could explain me where could this problem come? Thanks in advance gerald
Have you added any controls to the dialog which would cause CreateDialog to fail? You can add "no fail create" style (in the more styles box) to your dialog and see if any bits of it don't appear or cause your OnInitDialog / DoDataExchange functions to die. Good luck, Iain.
-
Have you added any controls to the dialog which would cause CreateDialog to fail? You can add "no fail create" style (in the more styles box) to your dialog and see if any bits of it don't appear or cause your OnInitDialog / DoDataExchange functions to die. Good luck, Iain.
For your first question i answer : yes I'm sorry, but i'm not sure to understand exactly what you mean by adding "no fail create" style how could i do that?
-
For your first question i answer : yes I'm sorry, but i'm not sure to understand exactly what you mean by adding "no fail create" style how could i do that?
Open the relevant dialog in VC++. Select the dialog itself. Press return and bring up the options box. One of the tabs at the top of the options box says "More styles". One if the checkboxes there says "no fail create". This sets a style flags telling windows not to fail on CreateDialog even if it can't create a part of the dialog box. OK? Iain.
-
Open the relevant dialog in VC++. Select the dialog itself. Press return and bring up the options box. One of the tabs at the top of the options box says "More styles". One if the checkboxes there says "no fail create". This sets a style flags telling windows not to fail on CreateDialog even if it can't create a part of the dialog box. OK? Iain.
Your method works if i choose Win32 Release mode for debugging my application, but with debug mode it doesn't work anymore, why?
-
Your method works if i choose Win32 Release mode for debugging my application, but with debug mode it doesn't work anymore, why?
I don't know exactly why, but there is an obvious place to start. In debug mode, newly allocated memory is filled with CC in each byte. In Release, it is filled with 00 in each byte. So you may have a variable that you have not explicitly initialised, but Release sets it to 0 / NULL. Maybe you've missed a DDX_Control? You'll need to put breakpoints in your dialogs constructor, OnInitDialog, etc and see where it dies in more detail. If you are really stuck, email me your project, and I'll have a look see. Iain.