|
Hi,
I am writting a OLE app that I want to be MFC based towards that end
I think I need two things
1) A Main Thread CWinApp
2) A main window "m_pMainWnd"
My question is can the main window be a modeless dialog box or does it have
to be CFrameWnd
Thanks
|
|
|
|
|
What do you mean by modeless?
In all MFC dialog based apps, the main dialog acts just like a modeless child dialog.
|
|
|
|
|
Something Along the lines of dlg.Create and then m_pMainWnd = &dlg;
|
|
|
|
|
It could, but exactly what advantage does it offer? A modal dialog as main window is a much better choice.
|
|
|
|
|
youre the MFC experts but doesn't a modal need a user respose yes/no when you do a dlg.domodal that thread stops until the user responds
I was wondering the automation examples (using MFC) had a modal dialogbox for the mainwindow ?
|
|
|
|
|
ForNow wrote: doesn't a modal need a user respose yes/no when you do a dlg.domodal that thread stops until the user responds True, but if it's the main window there is no other thread to worry about. You can do lots of actions within the dialog box while it is on the screen. Maybe you should explain exactly what problem you are trying to solve, rather than deciding on the window type before you know what you want to do with it.
|
|
|
|
|
I copied the code from msdn example on automation which had a main thread and a modal
dialog box for a main window I just changed the modal to modeless "dlg.create"
I had a problem on the create so created a CFrameWnd as the main window
anyway I got bigger problems I cann't get GetIDsOfNames to work
I'll post the particualrs on the "COM" forum
Thanks
|
|
|
|
|
The modal dialog is the main window in this sort of application. However, I'm still far from clear what you are really trying to do.
|
|
|
|
|
When you create the project choose Dialog Project in the options, this will give you a dialog applicaiton which I think is what you want.
==============================
Nothing to say.
|
|
|
|