CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    2

    How can I put a resource dialog onto a CMDIChildWnd?

    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.


  2. #2
    Join Date
    Apr 1999
    Location
    Monterrey, Mexico
    Posts
    21

    Re: How can I put a resource dialog onto a CMDIChildWnd?

    please be more specific. what is wrong with CFormView?


  3. #3
    Join Date
    Apr 1999
    Posts
    2

    More specific!

    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.


  4. #4
    Join Date
    Apr 1999
    Location
    Monterrey, Mexico
    Posts
    21

    Re: More specific!

    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)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured