Click to See Complete Forum and Search --> : Modeless Property Sheet


Thu Tran
April 1st, 1999, 10:15 AM
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?

JohnCz
May 21st, 1999, 10:25 AM
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