![]() |
Docking Pane Overdrawn. |
Post Reply ![]() |
Author | |
wnolan ![]() Newbie ![]() ![]() Joined: 11 April 2008 Location: United Kingdom Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() 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]
|
|
![]() |
|
Smucker ![]() Senior Member ![]() ![]() Joined: 02 February 2008 Status: Offline Points: 156 |
![]() ![]() ![]() ![]() ![]() |
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) |
|
![]() |
|
wnolan ![]() Newbie ![]() ![]() Joined: 11 April 2008 Location: United Kingdom Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
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]
|
|
![]() |
|
markr ![]() Senior Member ![]() Joined: 01 August 2004 Status: Offline Points: 443 |
![]() ![]() ![]() ![]() ![]() |
Does your frame window use a splitter window, by any chance?
|
|
![]() |
|
Smucker ![]() Senior Member ![]() ![]() Joined: 02 February 2008 Status: Offline Points: 156 |
![]() ![]() ![]() ![]() ![]() |
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) |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |