|
|
|
|
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 |
|
Bill Olson
|
Jul 8, 2014 - 11:05 PM
|
I have run into a problem with the title bar on skinned child windows in an MDI program.
The child class is declared as:
class CChildMyFrame : public CExtNCW < CMDIChildWnd >
In some situations, I need to turn off the title bar to the child windows, and other times I need it turned on. I was able to turn off everything on the bar including the title, but I couldn’t get it to go away. According to everything I found, turning off WS_CAPTION turns off the bar.
I set up an experimental Prof-UIS program and found that I could shut off the bar with ModifyStyle when the chile frame was not declared with CExtNCW. When the CExtNCW was added, the test program had the same behavior I saw in my application.
There appears to be something in CExtNCW that needs to be called to turn off the title bar.
Examining the Prof-UIS code, it looks like the following should work to dynamically shut off the title bar:
CWnd * pWndFrameImpl = (CWnd *)NcFrameImpl_GetFrameWindow();
pWndFrameImpl->ModifyStyle(WS_CAPTION, 0, SWP_FRAMECHANGED);
But it doesn’t do anything visible.
How do I shut off the title bar for MDI child frames skinned with CExtNCW?
Thanks,
Bill
|
|
Art Wilkes
|
Jul 9, 2014 - 10:48 AM
|
Seems that CExtNCW problems are more than one ;).
Overwrite “NcFrameImpl_IsSupported” in “CChildMyFrame” like this:
bool CChildMyFrame::NcFrameImpl_IsSupported() const { if (!__super::NcFrameImpl_IsSupported()) return false;
if ((GetStyle()&WS_CAPTION) == 0); return false;
return true; }
Prof-UIS Support
|
|
Art Wilkes
|
Jul 9, 2014 - 9:18 AM
|
We will look at this in the next couple of days.
Prof-UIS Support
|
|