dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Is there a Panel to use in Dialog App?

  1. #1
    Join Date
    Oct 2011
    Posts
    14

    Is there a Panel to use in Dialog App?

    I am working on a dialog based program with MFC.

    Because of old programming habits I would like to split the dialog window in areas. In my previous programming language I used a "Panel" to do that. I see that in a Form application there is a Panel to be used.

    Is there a class that I can add in OnInitDialog for this purpose?

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,551

    Re: Is there a Panel to use in Dialog App?

    With the right combination of properties you can make a static text control look like one.

  3. #3
    Join Date
    Oct 2011
    Posts
    14

    Re: Is there a Panel to use in Dialog App?

    Thanks for the idé, but finally made a GroupBox instead using:

    CButton m_groupBox;
    m_groupBox.Create(L"Caption", WS_CHILD|WS_VISIBLE|BS_GROUPBOX,
    CRect(0, 0, 200, 200), this, ID_MYGROUPBOX);

  4. #4
    Join Date
    Apr 1999
    Posts
    3,585

    Re: Is there a Panel to use in Dialog App?

    If I were you, I'd take the advice of GCDEF. Using a text control to define "child" areas on a dialog is pretty standard practice. You may run into some rendering and message problems if you use a button control.
    Gort...Klaatu, Barada Nikto!

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)