Click to See Complete Forum and Search --> : How can I put a resource dialog onto a CMDIChildWnd?


Sasi Zo
April 19th, 1999, 10:42 AM
I have a CMDIChildWnd. I'd like to put a dialog (made with resource editor) onto this CMDIChildWnd. I can't use AppWizard because I programme an ARX (~ AutoCAD DLL) file. I try CFormView, but it doesn't work. Certainly, I do it wrong.
Can you tell me that how to implement this?
Thanks.

eperales
April 19th, 1999, 01:31 PM
please be more specific. what is wrong with CFormView?

Sasi Zo
April 20th, 1999, 03:30 AM
More specific:


//Made with ClassWizard:
class OanMdiForm : public CFormView
{
...
OanMdiForm():CFormView(OanMdiForm::IDD) {};
BOOL Create(const RECT& rect, CWnd* pParent = NULL)
{ return CWnd::Create(NULL, NULL, WS_CHILD| WS_VISIBLE, rect, pParent, IDD); };
...
}

//Made with ClassWizard:
class OanDemMdi : public CMDIChildWnd
{
...
OanMdiForm Grid;
...
}

int OanDemMdi::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
...
Grid.Create(rect, this);
...
}




The MDI child window is appear, but there isn't the dialog in it. Why?
What am I doing wrong? Please, help me.

eperales
April 20th, 1999, 09:40 AM
Hi Sazi,

I'm using VC 5, and the code you shown, is not generated by the wizard. I suggest you to create a brand new project using the wizard, just to test your problem, and don't forget that the dialog template must have Child style (default is Popup)