|
|
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » GLCtrl display error on Vista
|
|
|
|
|
|
|
|
|
|
Re: GLCtrl display error on Vista [message #18444 is a reply to message #16549] |
Wed, 01 October 2008 14:50   |
kodos
Messages: 111 Registered: March 2008
|
Experienced Member |
|
|
Hi,
I think I have to open this thread again.
The problem is still there with the flickering in Vista, even if it is far better with the patch from luzr.
After I have reread the article on opengl.org I think I have found the problem. The WS_CLIPCHILDREN and WS_CLIPSIBLINGS have to be set on the parent window of the OpenGl control, not on the control itself.
With the following changes I haven't noticed any flickering yet:
TopWin32.cpp:86style |= WS_CAPTION|WS_CLIPSIBLINGS|WS_CLIPCHILDREN;
CtrlCore.h:1767 void Refresh() { InvalidateRect(GetHWND(), NULL, false); }
I don't call the Refresh() from Ctrl because in my tests it is not needed, but I have just done my tests with the GLCtrl and I don't know exactly what Refresh is doing.
DHCtrl.cpp:36 CreateWindowEx(0, "UPP-CLASS-A", "",
WS_CHILD|WS_DISABLED|WS_VISIBLE,
0, 0, 20, 20,
phwnd, NULL, hInstance, this);
The WS_CLIPSIBLINGS and WS_CLIPCHILDREN styles can be removed from here again.
But I don't know if this changes have some side effects with other controls that derive from DHCtrl, I really just know the GLCtrl and my custom CairoCtrl.
|
|
|
|
Re: GLCtrl display error on Vista [message #18472 is a reply to message #16549] |
Thu, 02 October 2008 19:14  |
kodos
Messages: 111 Registered: March 2008
|
Experienced Member |
|
|
Thanks for the update.
I have tested the changes a little bit, and it's better now.
The only problem now, there is still a flash, when the GLCtrl is shown the first time, that one isn't there with my solution. I don't know exactly why, but I think the SyncCaption function is called a bit "to late", but I'm really not sure .
But I have found some confusing things:
- If I comment out the line:
if(hasdhctrl)
style |= WS_CLIPSIBLINGS|WS_CLIPCHILDREN;
from SyncCaption it changes nothing. Actually I thought with this change it should be worse again but it isn't... Probably beacause of the new refresh function but I'm not sure.
- If I just comment out the if, the first flash is also gone.
EDIT: I just want to say that the first flash that is still there isn't really that bad, so if it's to complicated to fix it I think we could just leave it as it is.
[Updated on: Thu, 02 October 2008 19:15] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri May 09 11:50:29 CEST 2025
Total time taken to generate the page: 0.01454 seconds
|
|
|