Print Page | Close Window

new splitter drawing bug in 13.2.1 Windows 7

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=15520
Printed Date: 11 May 2024 at 8:12am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: new splitter drawing bug in 13.2.1 Windows 7
Posted By: adrien
Subject: new splitter drawing bug in 13.2.1 Windows 7
Date Posted: 02 November 2009 at 12:25am

getting odd drawing artifacts now (since moving to 13.2.1) on resizing splitters...



-------------
http://www.wingate.com - http://www.wingate.com



Replies:
Posted By: adrien
Date Posted: 02 November 2009 at 12:31am
actually what it looks like (does this for horizontal and vertical resize) is that it simply doesn't re-draw the actual splitter (the black bar) until you resize or otherwise invalidate the pane content.

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: Oleg
Date Posted: 02 November 2009 at 8:52am
Hi,
 
Can't reproduce it with our samples :( What version you previously used ?
Do you see it only while first running form ? Try add m_paneManager.RedrawPanes(); in the end of OnCreate.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: adrien
Date Posted: 02 November 2009 at 3:23pm
Hi

I previously ran 13.2.0, and every version back to 11.something, and never noticed it before.

It happens whenever I resize. I'm pretty sure it's new after 13.2 (i.e. I don't think it happened in 13.2).

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: Oleg
Date Posted: 03 November 2009 at 8:10am

Hi,

maybe you can cut your project and send to support to test ?
 
Do you have m_paneManager.UseSplitterTracker(TRUE) or FALSE ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: adrien
Date Posted: 03 November 2009 at 5:32pm
Hi. Unfortunately the project is very complex (lots of DLLs building the overall UI), so it's not simple to cut it out to send. However, I have some more information.

Basically the problem looks like it isn't drawing the splitter (black bar). This happens on a move of the splitter position. It does then draw it whenever

a) app loses focus
b) resize of app frame

I also got a partial draw of the splitter bar when some app underneath my app redrew an area.

This is on Windows 7 64 bit, but the app is a 32 bit app.

It doesn't happen when remote desktopped to that machine, only when logged in locally.

What you see in the problem area is a slice of the window that was on the side of the splitter that the splitter was moved towards. E.g. if you have a vertical splitter and move it to the right, you see a thin slice of what is the left-most part of the right pane.

I'll recheck to see if this happens on 13.2.0 and get back to you.

Adrien


-------------
http://www.wingate.com - http://www.wingate.com


Posted By: adrien
Date Posted: 03 November 2009 at 5:56pm
I rebuilt everything (about 40 projects - thank heavens for incredibuild!!!) on 13.2.0.

It looks like the problem still is there, but doesn't happen as often. E.g. it's less likely. On 13.2.1, it happens every move of the splitter. On 13.2.0 not so often. I guess this is why I didn't notice it before.

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: adrien
Date Posted: 03 November 2009 at 5:58pm
actually with the partial draws, depending on where I move the mouse around, I can get different bits of it to draw in.

This makes me think the rectangle for the splitter isn't being properly added to the window update region, and so the painting is being clipped or something.

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: Oleg
Date Posted: 04 November 2009 at 7:07am
Hi,
 
Please try to catch it with our samples. Try set same properties for DockingPane in sample as you have in your app.
Thanks


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: adrien
Date Posted: 12 November 2009 at 2:05am
Hi

sorry, I didn't try to repro yet with the samples. However, some more interesting information.

I have a tree on the left of my splitter in a docking pane. On the RHS I have the client area. If the client area contains a report control the problem doesn't occur.

Maybe the report control invalidates itself again on resize?


-------------
http://www.wingate.com - http://www.wingate.com


Posted By: Oleg
Date Posted: 12 November 2009 at 7:23am
Hi,
 
I think it can be application specific thing - maybe you constantly process messages and don't give chance for dockingPane catch MW_PAINT and draw it. or something like that. Check CPU load.
 
I don't think it will be too difficult copy project, cut its functionality and send to support to test. sorry I don't see another way how we can help here.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: adrien
Date Posted: 12 November 2009 at 3:43pm
Hi

CPU load is very small. This is on an i7.

There are thousands of files in the project, and the UI framework loads DLLs that are sent over the wire from our back end. So it would take me about a week to strip everything out.

I will try to debug myself - anywhere I should look first?

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: Oleg
Date Posted: 13 November 2009 at 3:24am

Hi,

Trace when CXTPDockingPaneSplitterWnd::OnPaint() called


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 13 November 2009 at 5:44pm
Could have something to do with this:
http://forum.codejock.com/forum_posts.asp?TID=14705&KW=OnIdle - http://forum.codejock.com/forum_posts.asp?TID=14705&KW=OnIdle


-------------
PokerMemento - http://www.pokermemento.com/


Posted By: adrien
Date Posted: 25 November 2009 at 1:43am
Originally posted by oleg oleg wrote:

Hi,


Trace when CXTPDockingPaneSplitterWnd::OnPaint() called


Hi Oleg

It's getting called twice on each move. However I'm pretty certain it's something to do with management of the update region, since sometimes only part of the splitter is actually redrawn. In fact it can be patchy, like several chunks of it drawn, but not the whole thing.

It gets properly drawn whenever the focused docking pane is changed (e.g. click on another docking pane).

I tried calling invalidate on the splitter window after the tracking, but that didn't help either. I think there's something funny going on with the window update regions or clipping regions.



-------------
http://www.wingate.com - http://www.wingate.com


Posted By: adrien
Date Posted: 25 November 2009 at 3:10pm
I can confirm it's an update region issue.

When it's showing the problem, I can drag another small application frame over it (like the eraser in mspaint), and it draws only under where the application has been dragged over.

So the bar isn't being added to the update region. As for why Invalidate() doesn't fix this...?



-------------
http://www.wingate.com - http://www.wingate.com


Posted By: Oleg
Date Posted: 26 November 2009 at 1:55am
Hi,
 
I still think its some of you attached window is reason. Maybe in its drawing routine it set clip region or something.
 
Try go to AttachWindow handler and don't attach some windows (all or single) and check if you still see it.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: adrien
Date Posted: 26 November 2009 at 6:12am
the child are of the pane manager I don't think we attach the windows to it.

I have a lot of windows which I put in that child area, and swap between them depending on the selection from a navigation tree control. I tried attaching and detaching them from the pane manager before in the past and it had all sorts of problems. So, the window on the RHS isn't a child of the pane manager.

Actually I can't find a window in Spy++ that is the pane manager - only the dockingpanesplitter and dockingpanetabbedcontainer windows. The "child" area is a sibling of those.



-------------
http://www.wingate.com - http://www.wingate.com


Posted By: younicke
Date Posted: 26 November 2009 at 6:56am
try turning aero off and see if it makes any difference.


Posted By: adrien
Date Posted: 29 November 2009 at 9:30pm
yep!

With aero off, it doesn't do it any more.

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: adrien
Date Posted: 30 November 2009 at 1:16am
actually, looks like it still does do it with aero off.

And the funny thing is, it does this for MSDev 2008 as well!

So I guess this is MS functionality that is being replicated :)

Wonder if it could be my OS? We had some other issues with missing WM_SIZE messages.

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: adrien
Date Posted: 30 November 2009 at 1:28am
looks like something to do with desktop composition (performance visual effect settings).

If I turn this off, the problem goes away. Funny that MSDev 2008 suffers from the same problem.

Problem is it all looks like cr*p if I turn that off.


-------------
http://www.wingate.com - http://www.wingate.com


Posted By: znakeeye
Date Posted: 30 November 2009 at 6:40am
Update your GFX card drivers! Your current driver is buggy, no doubt.


Posted By: adrien
Date Posted: 30 November 2009 at 4:12pm
I updated them, but no difference (nVidia 9600 GT x 2).

I don't think it's a driver issue, I don't see how a video driver can mess with WM_PAINT, WM_SIZE messages and update / clipping regions.

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: znakeeye
Date Posted: 01 December 2009 at 6:11am

Drivers can definitely (indirectly) mess with WM_PAINT. I've had troubles with OpenGL-accelerated window surfaces that were erroneously drawn above other windows and stuff (similar to clipping issues). Try turning hardware acceleration off, and see if that helps.



Posted By: adrien
Date Posted: 01 December 2009 at 5:28pm
doesn't look like it's possible to turn it off with the nVidia control panel, and the troubleshooting button is disabled.

But we're talking about the splitter bar here, which is just a window. It's only 2D.

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: adrien
Date Posted: 01 December 2009 at 5:34pm
also, it doesn't happen when certain controls are on the RHS of the splitter (such as report ctrl).


-------------
http://www.wingate.com - http://www.wingate.com


Posted By: rdhd
Date Posted: 04 December 2009 at 6:15pm
I had issues like this with vista with the task panel in my docking pane. I posted here (prettry sure I did) but never solved the problem. So I did this:

void TurnOffTheme( HWND hWnd )

{

HINSTANCE hTheme;

//load the DLL

hTheme = LoadLibrary(TEXT("uxtheme.dll"));

if(hTheme)

{

HRESULT hr = S_OK;

SETWINDOWTHEME pDllSetWindowTheme;

pDllSetWindowTheme = (SETWINDOWTHEME)GetProcAddress(hTheme, "SetWindowTheme");

if(pDllSetWindowTheme)

{

(*pDllSetWindowTheme)(hWnd, L" ", L" ");

}

}

}

In my OnCreate code I do this:

...
 
if ( IsSystemVista() && m_TaskPanel.GetSafeHwnd() )

{

TurnOffTheme( m_TaskPanel.GetSafeHwnd() );

}

...
 
This allows you to test if it is the theme and also allows you to still run with your theme elsewhere in your app since it only turns off the windows theme for a single window.
 
I have had to turn off themes in a number of places, especially when doing custom coloring (OnCtlColor) for certain controls in dialogs. I never figured out why I got the problem in the first place for the docking pane/task panel window we have but your descriptions of the problem are pretty much the same ones I have in our app.


Posted By: adrien
Date Posted: 06 December 2009 at 10:24pm
Hi

this is for Oleg - the sample suffers the same problem.



regards

Adrien

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: adrien
Date Posted: 07 December 2009 at 4:07am
tried another Win7 machine - different drivers / video hardware (but still NVidia), same problem.

Need to try with other hardware - Oleg, you got any NVidia hardware there? Tried 9600GT and 6200LE

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: Oleg
Date Posted: 07 December 2009 at 7:46am
Hi,
 
Yes, I test it with NVIDIA GeForce 7600 GS but don't see it. What exactly you did with sample to catch it. Just run and see it ?
 
Do you test Windows 7 x64 in all cases ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 07 December 2009 at 9:30am
Try changing the following Display Settings:
 
Appearance -> Effects...
 
Scroll effect
ClearType
etc


Posted By: jimmy
Date Posted: 07 December 2009 at 10:55am
Hello,

Have test Pane.exe on standard Windows 7 installation with NVIDIA  7600 GS.
And see same trouble.
Only with AERO.
After disable areo, it work.

  Jimmy


Posted By: adrien
Date Posted: 07 December 2009 at 4:18pm
Originally posted by oleg oleg wrote:

Hi,
 

Yes, I test it with NVIDIA GeForce 7600 GS but don't see it. What exactly you did with sample to catch it. Just run and see it ?

 

Do you test Windows 7 x64 in all cases ?


yes, we just ran the sample, didn't touch the code for it.

I think it was Windows 7 64 bit in all cases

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: Oleg
Date Posted: 08 December 2009 at 8:38am
Jimmy, you have x64 machine also ?
 
Originally posted by jimmy jimmy wrote:

Hello,

Have test Pane.exe on standard Windows 7 installation with NVIDIA  7600 GS.
And see same trouble.
Only with AERO.
After disable areo, it work.

  Jimmy


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: SuperMario
Date Posted: 08 December 2009 at 12:01pm
Any chance you can make a video of how you do this?  I have Win7 - x64 and also don't see this.  I ran the same code you all have from 13.2.1. 

This machine has a NVIDIA Quadro PCI-E Series card.

I leave Aero ON for the test.

Do you see it running the exe from here?
http://codejock.com/downloads/samples/dockingpane.asp


Posted By: SuperMario
Date Posted: 08 December 2009 at 12:04pm
I think I see how you make the sample simply by trying to make the sample look like the screen you posted, but still don't see any issue with it.


Posted By: adrien
Date Posted: 08 December 2009 at 2:24pm
I'll try that app when I get to the office, ands see about a screen video capture (screen is 3 x 1920 x 1200 tho). All I did to repro is

a) compile the app (dynamically linked and unicode btw)
b) run it
c) drag any splitter bar
d) take the screenshot
e) mark-up the screenshot to show the problem

The problem is it doesn't redraw the splitter bar once it is moved, what shows in the location of the splitter bar is what was in the panes under that location.



-------------
http://www.wingate.com - http://www.wingate.com


Posted By: adrien
Date Posted: 08 December 2009 at 4:57pm
the downloaded sample has the same problem



both 32 bit and 64 bit ones show the same problem.

But it could be the video driver I guess. All tests that replicate this problem use the same NVidia driver distribution. But then probably quite a few people are using that driver.

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: adrien
Date Posted: 08 December 2009 at 5:46pm
ok, try attached screen cap.
uploads/20091208_174559_screencap.zip - 20091208_174559_screencap.zip

-------------
http://www.wingate.com - http://www.wingate.com


Posted By: jimmy
Date Posted: 09 December 2009 at 2:46am
Hi Oleg,

We have Win 7 32 Bit.

  greetings
      Jimmy



Posted By: jimmy
Date Posted: 09 December 2009 at 3:16am
Hi Oleg,

Same trouble with v11.1.3.

After the paint bug move mouse over minimize/maximize/close button.
It get a redraw, and all look nive.

  Jimmy



Posted By: Kenneth
Date Posted: 09 December 2009 at 8:28am
We see the same problem on Windows 7, 32 bit.  Using NVIDIA GeForce Go 7900 GS display adapter, driver version 7.15.11.7948 dated 1/30/2009.
Very easy to duplicate using Codejock Pane Sample.  Just move any splitter.  Also observe same as Jimmy; move mouse over minimize/maximize/close button and problem goes away.


Posted By: Oleg
Date Posted: 09 December 2009 at 8:28am
Hi,
 
Thanks, today catched it once with Windows 7 - checking what can be reason now.
 
Maybe one of solution is to disable trackers and use "live" resizing -

m_paneManager.UseSplitterTracker(FALSE);



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net