Dialog in a DLL
-
When I define a dialog in a dll (MFC) the compiler refuses to recognise the resource ID. Do I have to use COM? GER Ger
-
When I define a dialog in a dll (MFC) the compiler refuses to recognise the resource ID. Do I have to use COM? GER Ger
more complicated than you may think. If you are using a MFC extension DLL then you will need to link the resources of your DLL into the clients resource chain. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_MFCNOTES_TN033.asp[^] If you are using a bog standard DLL you need to switch the context to that of the DLL using a call to
AFX_MANAGE_STATE(AfxGetStaticModuleState());
before constructing the dialog class. I do this by having a manager class do all the dialog construction/domodal e.t.c. from within the DLL so I can make the manage state call. This will lead to all sorts of other issues if your dialog is modeless though. Not the view of my employer