![]() |
Redraw Issue with CXTPTabClientWnd |
Post Reply
|
| Author | |
Graham
Groupie
Joined: 12 May 2003 Location: United Kingdom Status: Offline Points: 23 |
Post Options
Thanks(0)
Quote Reply
Topic: Redraw Issue with CXTPTabClientWndPosted: 21 June 2005 at 11:23am |
|
When using CXTTabClientWnd for tabbed windows the redraw is messy when switching between windows when they are maximised. It looks as though when you press the tab to change active window, the window is first drawn restored, then drawn maximised which makes it look messy. It is easily reproducable using the toolkit example program MDIPanes. In MDIPanes ManFrm.h add the following member variable to add tabbed windows CXTPTabClientWnd m_MTIClientWnd Then in CMainFrame::OnCreate, add the following line before LoadCommandBars m_MTIClientWnd.Attach (this, FALSE); Then when you run the application, add a couple of new documents, maximize the documents, and then switch between them using the tabs. Thanks, Graham |
|
![]() |
|
proe
Newbie
Joined: 17 June 2005 Location: China Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 July 2005 at 3:37am |
|
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) if( !CMDIChildWnd::PreCreateWindow(cs) ) return TRUE; |
|
![]() |
|
pascal
Groupie
Joined: 07 February 2005 Location: Germany Status: Offline Points: 25 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 July 2005 at 3:24pm |
|
Hello, the best way to avoid fleeking is to inherit from CXTPTabClientWnd and to catch the WM_MDIACTIVATE message. You should then lock the redraw before calling the base class and unlock it after execution. See code below. best regards from Göttingen, germany BEGIN_MESSAGE_MAP(CMainTabClientWnd, CXTPTabClientWnd)ON_WM_MDIACTIVATE() { SetRedraw(FALSE); CWnd::OnMDIActivate(bActivate, pActivateWnd, pDeactivateWnd); SetRedraw(TRUE); RedrawWindow( NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_ALLCHILDREN); |
|
|
Pascal Verdier
Software Engineer Manager |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |