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

    Creating Dialog Box

    How do you create a Dialog Box from a class with a CWnd base class?


  2. #2
    Join Date
    Sep 1999
    Location
    Virginia
    Posts
    5

    Re: Creating Dialog Box

    In VisualC++, a dialog box is derived from CDialog. You could create a modeless dialog box class, and create an instance of it in the CWnd
    derived class. You would need to create a function such as GetParent() in the dialog box class, then in the CWnd, OnInitDilaog() function,
    pass the address of the parent DialogBoxClass->GetParent(this); Then you can show, or not show the parent window.
    Create the Dialog box, and make controll functions there. I have an example of this kind of code that works, I could EMail it to you if you
    were interested. Let me know if this helps at all.
    Joe Farkas
    [email protected]
    [email protected]



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