Toggle title bars on/off 
Author Message
 Toggle title bars on/off

I'm trying to programmatically toggle titles bars on and off so that only
the active MDI window has a title bar.  I'm using the following code:

void CBaseChildFrame::OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd,
CWnd* pDeactivateWnd)
{
 CMDIChildWnd::OnMDIActivate(bActivate, pActivateWnd, pDeactivateWnd);

 if( bActivate == FALSE )
 {
  DWORD dwStyle = ::GetWindowLong(m_hWnd, GWL_STYLE);

  dwStyle &= ~WS_CAPTION;

  ::SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);

 }
 else
 {
  DWORD dwStyle = ::GetWindowLong(m_hWnd, GWL_STYLE);

  dwStyle |= WS_CAPTION;

  ::SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);

 }

 RedrawWindow( );

Quote:
}

Any ideas?


Tue, 16 Dec 2003 05:35:10 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How do I switch off the title bar in a MDI application

2. Tear-off toolbar title bar problem

3. toolbars toggle on/off

4. Title in SDI Title Bar

5. specify a title/title bar in CTreeView ?

6. AfxMessageBox title is chopped off~

7. Turning off Vert Scroll bar on a WinForm

8. Status Bar cutting off text

9. Can't restore app off task bar unless right click:

10. How to default the Status Bar to off?

11. CRichEditCtrl/View - how to turn off scroll bars

12. CView:rid off menu bar and rise viewport window into relief

 

 
Powered by phpBB® Forum Software