Independant MFC window
I am developping a program using an independant MFC window(setup). But the rest of the application is a Win32 prog. I tried to implement a MFC Dialog based window with Visual C++ to use it in my application using MyWin->DoModal(). But it crashes !!!
The problem is that VSC++ creates a global MFC application required, I think, to use the modal window. So, how can I use an independant MFC windows.
Thanks.
where does it crash?
i''d say it''s possible to have an mfc window without using i.e. CApplication and other mfc stuff, but without more details it''s hard to say what your problem is.
make sure you''re running a debug build.
i''d say it''s possible to have an mfc window without using i.e. CApplication and other mfc stuff, but without more details it''s hard to say what your problem is.
make sure you''re running a debug build.
The problem is that when you use VisualC++ to generate a Modal Application, it creates a global application which call the modal box using win.DoModal() in the init function.
I tried to take the .cc and .h of the modal box to import in my application(which is a win32 one). So, I created the win and when I called win.domodal(), it crashed.
Is it some initialisations required by the modal box?
I tried to take the .cc and .h of the modal box to import in my application(which is a win32 one). So, I created the win and when I called win.domodal(), it crashed.
Is it some initialisations required by the modal box?
The problem is that when you use VisualC++ to generate a Modal Application, it creates a global application which call the modal box using win.DoModal() in the init function.
I tried to take the .cc and .h of the modal box to import in my application(which is a win32 one). So, I created the win and when I called win.domodal(), it crashed.
Is it some initialisations required by the modal box?
I tried to take the .cc and .h of the modal box to import in my application(which is a win32 one). So, I created the win and when I called win.domodal(), it crashed.
Is it some initialisations required by the modal box?
The problem is that when you use VisualC++ to generate a Modal Application, it creates a global application which call the modal box using win.DoModal() in the init function.
I tried to take the .cc and .h of the modal box to import in my application(which is a win32 one). So, I created the win and when I called win.domodal(), it crashed.
Is it some initialisations required by the modal box?
I tried to take the .cc and .h of the modal box to import in my application(which is a win32 one). So, I created the win and when I called win.domodal(), it crashed.
Is it some initialisations required by the modal box?
The problem is that when you use VisualC++ to generate a Modal Application, it creates a global application which call the modal box using win.DoModal() in the init function.
I tried to take the .cc and .h of the modal box to import in my application(which is a win32 one). So, I created the win and when I called win.domodal(), it crashed.
Is it some initialisations required by the modal box?
I tried to take the .cc and .h of the modal box to import in my application(which is a win32 one). So, I created the win and when I called win.domodal(), it crashed.
Is it some initialisations required by the modal box?
Take a look at using the AfxWinInit function before you instantiate your MFC-based dialog. I think it does the required setup. The call syntax is the same as that for WinMain. Here''s the template:
BOOL AFXAPI AfxWinInit( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow );
Hope this helps.
BOOL AFXAPI AfxWinInit( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow );
Hope this helps.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement