Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Docking Pane Overdrawn.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Docking Pane Overdrawn.

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

Joined: 11 April 2008
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote wnolan Quote  Post ReplyReply Direct Link To This Post Topic: Docking Pane Overdrawn.
    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]
Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post 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)

Back to Top
wnolan View Drop Down
Newbie
Newbie
Avatar

Joined: 11 April 2008
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote wnolan Quote  Post ReplyReply Direct Link To This Post 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]
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2008 at 11:06am
Does your frame window use a splitter window, by any chance?
Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post 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)

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.109 seconds.