Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - MDI ChildFrame Repaint/Resize issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MDI ChildFrame Repaint/Resize issue

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


Joined: 18 May 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote steve_murch Quote  Post ReplyReply Direct Link To This Post Topic: MDI ChildFrame Repaint/Resize issue
    Posted: 23 May 2007 at 2:55pm

Hi Oleg and team,

I love the framework you've built.  Samples are generally quite clear, and I really appreciate the extra time you've put into making this accessible.

I've got a flicker-problem I'm trying to figure out with an MDI application that I'm building using both your RibbonBar and pane framework.  This problem doesn't exist in your sample application, so I know its somewhere in my code.  But I've gone over, and over and over what might be different between my app and your samples, and can't find anything.  I'm hoping you can point me to some specific things to look for on the off chance you (or others) have seen this before.  (Looked on the forums here too and didn't see anything related to this.)

 
The problem is that my app paints just fine the upon initial load, but every time I try to resize the MainFrm, in a split second, the ChildFrm window gets painted at 0,0 (where 0,0 is the upper leftmost and topmost pixel of the MainFrm window).  Indeed, when I trap the OnSize event of the ChildFrm, even before it gets to the OnSize of that ChildFrm, somehow the active view gets repainted at 0,0.  It is then erased and (properly) repainted when I continue.
This split-second repaint causes a very annoying flicker in the application when the mainfrm is resized.

I've tried stripping my app down to its bare minimum, making the activeview a simple RichEditView just like the sample, and it has the same problem.  I've also tried removing the PaneManager from the code, as well as the skinning of the underlying panes and active view, and the same thing happens.    I'm not doing anything in the OnSize event of the MainFrm or the ChildFrm. 

Why do you think my active View might be being repainted at 0,0 before its re-painted again in its expected position?  (It doesn't happen like this in your samples, particularly RibbonMDISample.)
 
I am using the very latest code -- 11.1.2 
 
------
In main application .cpp:
 

CMultiDocTemplate* pDocTemplate;pDocTemplate = new CMultiDocTemplate(IDR_BigOven_2TYPE, RUNTIME_CLASS(CBigOven_2Doc), RUNTIME_CLASS(CChildFrame), RUNTIME_CLASS(CTestView));

CTestView is simply a subclassed CRichEditView
 
 
MainFrm::OnSize DOES NOT exist, nor am I trapping the message
CChildFrm::OnSize DOES NOT exist
 
 
Back to Top
steve_murch View Drop Down
Newbie
Newbie


Joined: 18 May 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote steve_murch Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 2007 at 3:03pm

DISREGARD

[Once again, I just knew that the moment I posted a question here, I'd find the mistake and it'd be a stupid one.
 
If anyone else runs into this, the problem was that in MainFrm.cpp, I had this:
 
// wrong
IMPLEMENT_DYNAMIC(CMainFrame, CXTPFrameWnd)BEGIN_MESSAGE_MAP(CMainFrame, CXTPFrameWnd)
instead of this:
 
//right
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
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.046 seconds.