Print Page | Close Window

the view is drawed twinkling

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1949
Printed Date: 08 November 2025 at 2:19pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: the view is drawed twinkling
Posted By: freehawk
Subject: the view is drawed twinkling
Date Posted: 10 March 2005 at 8:17pm

Hello

There are tabbed MDI client windows which can be changed to Max, Min or normal size. After maximized one window, and then switched among client windows by clicked the title tabs, the view is drawed twinkling and not smooth. Please help me how to resolve it?

Thanks.

Freehawk




Replies:
Posted By: proe
Date Posted: 03 July 2005 at 3:38am

BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
 // Make sure view is maximum size to eliminate
 // flicker when switching tabs.
 cs.x = cs.y = 0; 
 cs.cx = cs.cy = 32767;

  if( !CMDIChildWnd::PreCreateWindow(cs) )
  return FALSE;

 return TRUE;
}



Posted By: pascal
Date Posted: 07 July 2005 at 2:47pm

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()
END_MESSAGE_MAP()

void CMainTabClientWnd::OnMDIActivate(BOOL bActivate,CWnd* pActivateWnd, CWnd* pDeactivateWnd)
{
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net