Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Whole application flickers upon resize
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Whole application flickers upon resize

 Post Reply Post Reply
Author
Message
clintsinger View Drop Down
Newbie
Newbie


Joined: 15 May 2003
Location: Canada
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote clintsinger Quote  Post ReplyReply Direct Link To This Post Topic: Whole application flickers upon resize
    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.

Back to Top
Sven View Drop Down
Senior Member
Senior Member


Joined: 21 August 2003
Location: Germany
Status: Offline
Points: 127
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sven Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
clintsinger View Drop Down
Newbie
Newbie


Joined: 15 May 2003
Location: Canada
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote clintsinger Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 September 2003 at 12:01pm

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

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

Back to Top
kstowell View Drop Down
Admin Group
Admin Group


Joined: 25 January 2003
Location: MIchigan, USA
Status: Offline
Points: 496
Post Options Post Options   Thanks (0) Thanks(0)   Quote kstowell Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.