Docking Pane Overdrawn.
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=10526
Printed Date: 13 May 2025 at 1:49pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Docking Pane Overdrawn.
Posted By: wnolan
Subject: Docking Pane Overdrawn.
Date Posted: 06 May 2008 at 11:44am
Hey,
I seem to be having problems where the view is drawing over a pane when its dynamically popped up (Unpinned).
Its an SDI application. The application's view receives refresh messages about once a second and repaints itself.
When I unpin the pane but have it visible, the main view draws over both the pane frame and the contents of the pane. I have created the contents of the pane with WS_CLIPSIBLINGS but that made any difference.
Any pointers?
------------- [Theres no place like 127.0.0.1]
|
Replies:
Posted By: Smucker
Date Posted: 06 May 2008 at 12:01pm
1) Need WS_CLIPCHILDREN too!
2) Be sure you're only painting in OnPaint() or OnDraw(), and using the provided HDC/CDC.
------------- Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)
Language: Visual C++ 9.0 (Studio 2008)
|
Posted By: wnolan
Date Posted: 07 May 2008 at 4:48am
Hi,
Thanks for the fast reply!
The CWnd Objects that sit in my pane, are created with the WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles. However this doesn't seem to change anything. The Docking pane frames themselves are created with these Styles (In the DockingPaneManager I think) but they too are still getting overdrawn.
The painting is done in OnPaint using a PaintDC. However it is all refreshed by a function in the Mainframe that calls RedrawWindow for the view.
------------- [Theres no place like 127.0.0.1]
|
Posted By: markr
Date Posted: 07 May 2008 at 11:06am
Does your frame window use a splitter window, by any chance?
|
Posted By: Smucker
Date Posted: 07 May 2008 at 6:46pm
You say "a paint DC," are you sure it's the one for the window you're painting; i.e.:
void CMyWnd::OnPaint() { CPaintDC dc(this); //etc// }
------------- Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)
Language: Visual C++ 9.0 (Studio 2008)
|
|