Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Dockingpanes rpaint problem in Autohide
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Dockingpanes rpaint problem in Autohide

 Post Reply Post Reply
Author
Message
stanimir View Drop Down
Newbie
Newbie
Avatar

Joined: 17 September 2004
Location: Bulgaria
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote stanimir Quote  Post ReplyReply Direct Link To This Post Topic: Dockingpanes rpaint problem in Autohide
    Posted: 17 September 2004 at 1:58am
Hello guys. When I have some kind of painting which regularly change in a MDI window (like simple colorful rectangles) and a docking pane attached to this window in auto hide mode I get the following results:
At the moment when the pane expands (shows) by pressing the tab button the colored rectangles are drawn straight trough the pane and scrabbles it. The pane is not redrawn until it doesn't hide. Attached modified one of the original samples
2004-09-17_015404_MDIPanes.zip
Please help me to fix this problem?
Back to Top
xred View Drop Down
Groupie
Groupie
Avatar

Joined: 24 August 2004
Location: China
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote xred Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 11:13pm

void CMDIPanesView::OnTimer(UINT nIDEvent)
{
 // TODO: Add your message handler code here and/or call default
 m_color = RGB(rand()%255, rand()%255, rand()%255);
 
 Invalidate(false);
}



Edited by xred
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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 2004 at 3:40am

Add clip styles to your view:

BOOL CMDIPanesView::PreCreateWindow(CREATESTRUCT& cs)
{
 cs.style |= WS_CLIPCHILDREN|WS_CLIPSIBLINGS;

 return CView::PreCreateWindow(cs);
}

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
stanimir View Drop Down
Newbie
Newbie
Avatar

Joined: 17 September 2004
Location: Bulgaria
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote stanimir Quote  Post ReplyReply Direct Link To This Post Posted: 20 September 2004 at 7:05am
Thanks a lot for your help. It works ok now. I actually saw the same recommendation in another post and tried it but without success because i did not put the code on the right place.
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.047 seconds.