Print Page | Close Window

Whole application flickers upon resize

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=147
Printed Date: 22 December 2024 at 5:32pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Whole application flickers upon resize
Posted By: clintsinger
Subject: Whole application flickers upon resize
Date Posted: 03 September 2003 at 5:07pm

Hi All,

I have a ToolkitPro application that I am working on and I am having a problem with the redrawing.  When I resize the Main frame window the whole application flickers, including menus, command bars and statusbar.  I am using the theme kit as well as the outlook bar.  On the right hand side of the outlook bar I have a regular CView derived object which uses CXTMemDC for drawing. I am not sure what I could be doing wrong as the demo applications don't flicker at all.  Is it possible that I am using too many resources?

I am also running my screen resolution at 1600x1200 on a dual Pentium III 866 on Windows XP Professional.




Replies:
Posted By: Sven
Date Posted: 05 September 2003 at 12:25pm
It seems that the main window has set the CS_HREDRAW/CS_VREDRAW style. Just define your own window class instead.


Posted By: clintsinger
Date Posted: 18 September 2003 at 6:47pm

It seems that is not the case.  Any other ideas of what would be causing a complete redraw everytime I resize?



Posted By: Oleg
Date Posted: 20 September 2003 at 12:01pm

I had such problem when in CMainFrame::PreCreateWindow of MDI frame

call CFrameWnd::PreCreateWindow instead CMDIFrameWnd::PreCreateWindow....



Posted By: kstowell
Date Posted: 16 October 2003 at 6:03pm

Try adding this to your CMainFrame::PreCreateWindow method:

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
   
if( !CFrameWnd::PreCreateWindow(cs) )
       
return FALSE;

    // TODO: Modify the Window class or styles here by modifying
   
// the CREATESTRUCT cs

    // Helps to reduce screen flicker.
   
cs.lpszClass = AfxRegisterWndClass(0, NULL, NULL,
       
AfxGetApp()->LoadIcon(IDR_MAINFRAME));

    return TRUE;
}

Let me know if this helps.

Kind regards,
Codejock Support




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