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

    Modeless Property Sheet



    I created a modeless propery sheet using the Create function:

    m_pMySheet = new MySheet("Caption", NULL, 0);

    if (!m_pMySheet->Create()

    {

    delete m_pMySheet;

    m_pMySheet = NULL;

    }

    I connected the property sheet to a menu item. When the menu item is selected, the property sheet pops up. However,

    when I click on another menu item, the property sheet is hidden by the main window. In order word, when the focus is

    not on the property sheet, it gets hidden behind the main window. To get access to the property sheet again, I have to

    resize the main window. When I put a CMiniFrameWnd wrapper around the property sheet, then it remains visible and works

    properly. Is there away to do this without putting the CMiniFrameWnd wrapper around the property sheet? Also, is

    there aways to get to hidden windows (Windows that are there but are hidden by other bigger windows) using keyboard

    shortcut?

  2. #2
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: Modeless Property Sheet

    Use
    if (!m_pMySheet->Create(this)



    otherwise the parent window is set to NULL and desktop window is the parent of your property sheet. Property sheet window like a dialog stays on the top of the parent in non-modal state.

    You have created your with WS_CHILD, so it behaves correctly.


    John Cz
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

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