Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Layout and Paint event processing
Layout and Paint event processing [message #14313] |
Fri, 22 February 2008 12:08  |
masu
Messages: 378 Registered: February 2006
|
Senior Member |
|
|
Hi,
I have a problem with attached program, in which I overwrite a ctrl Paint method as well as its Layout method.
What I am trying to achieve is that when the TopWindow is resized I process the Layout event first and afterwords the Paint event.
But this is only working as expected if I call Layout function explicitly inside Paint function.
So my question is: What is the event sequence?
Example package is attached.
WinXP, Mingw 3.4.2
Matthias
|
|
|
|
|
Re: Layout and Paint event processing [message #14316 is a reply to message #14315] |
Fri, 22 February 2008 13:39   |
Oblivion
Messages: 1204 Registered: August 2007
|
Senior Contributor |
|
|
You are right I Use MSVC too, but can't see dots unless I de-comment the Layout() line in the GLPaint in your example
In Win32GLCtrl.cpp, line 92:
LRESULT GLCtrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if(message == WM_PAINT && hDC && hRC) {
wglMakeCurrent(hDC, hRC);
GLPaint();
SwapBuffers(hDC);
wglMakeCurrent(NULL, NULL);
PAINTSTRUCT ps;
BeginPaint(GetHWND(), &ps);
EndPaint(GetHWND(), &ps);
return 0;
}
return DHCtrl::WindowProc(message, wParam, lParam);
}
It seems that Layout() is called AFTER GLPaint(). I'm not sure if this is intentional or a bug.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Fri, 22 February 2008 13:47] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Mon Apr 28 20:41:39 CEST 2025
Total time taken to generate the page: 0.01170 seconds
|