
problem with displaying dialogs from dlls in the main window
Hi,
I have a little problem.
My programm is modul-based and the dlls need to display dialogs in the
window of the main-programm, so I pass the CWND - Pointer of the
MainWindow (AfxGetMainWnd) to the dlls.
In the dlls there are the resources and a normal class derrived from
cdialog. What I do is to construct an object of my dialog-class with
such a constructor:
MyDialogClass dialog_obj (_cwnd_main_window)
With this constructor the dialog-object should know in which window to
display the dialog, but of course the domodal returns -1, which means
that it fails to create the dialog.
The de{*filter*} shows me that the m_hwnd member of the dialog_obj is
NULL, but what have I done wrong?
Thanks a lot in advance,
Chris.