|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Harvey Cohen
|
Mar 16, 2005 - 11:58 PM
|
Hello,
I am continuing to evaluate Prof-UIS for commerical use. I am trying to get a dialog to appear inside a resizable control bar. I used the following code in a fashion analogous to the example "MDI" ..
In Mainframe.h, the following is declared:
CExtControlBar thePaletteBar CExtWRB< CExtResizableDialog > paletteDialog;
In Mainframe.cpp, inside the method On_Create, I have
if( !thePaletteBar.Create( _T("Design Palette"), this, ID_VIEW_DESIGNPALETTE)) { TRACE0("Failed to create design palette\n"); return -1; // fail to create } if( !paletteDialog.Create( IDD_DDESIGNPALETTE, &thePaletteBar ) ) { TRACE0("Failed to create palette dialog\n"); return -1; // fail to create } paletteDialog.ShowSizeGrip ( FALSE );
ID_VIEW_DESIGNPALETTE is the resource ID for a menu item associated with viewing the control bar and IDD_DDESIGNPALETTE is the resource ID for a dialog box.
The dialog box DOES NOT appear inside the control bar, and if I execute the code
paletteDialog.ShowWindow (SW_SHOW), the dialog box appears, but OUTSIDE the control bar.
What is going on?
TIA
Harvey
|
|
Technical Support
|
Mar 17, 2005 - 5:20 AM
|
As you know, there are two types of windows: popup and child. Popup windows like the main frame window or main dialog window are child windows of the desktop, which is the top window in the Windows OS. All the windows inside any pop-up window are child windows. So, it seems you need to just check the properties of your dialog resource and set the dialog type to child inside popup and set the Visible property to true. After that, you don’t need to show the dialog explicitly.
|
|
Harvey Cohen
|
Mar 17, 2005 - 8:05 PM
|
That was it. I do tend to gloss over the properties of added resources, and I shouldn’t.
Thanks
|
|