U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Layout and Paint event processing
Re: Layout and Paint event processing [message #14317 is a reply to message #14316] Fri, 22 February 2008 13:51 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Sorry, my mistake.

The problem is that the rendering context isn't being made current before Layout is called, so your projection matrix calls have no effect.

If you change it like so:
void Layout()
{
    wglMakeCurrent(GLCtrl::GetDC(), GLCtrl::GetHGLRC());

    ....Projection stuff

    wglMakeCurrent(NULL, NULL);
}

it almost fixes the problem, but you need to force a call to Layout AFTER the window has openned as well (Layout is normally called before). So add the following function:
void State(int reason) 
{
    GLCtrl::State(reason);
    Layout();
}


This should really all be done by GLCtrl (with a GLLayout function).

James
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Key in DropList cannot be same
Next Topic: window resized has no CALLBACK?
Goto Forum:
  


Current Time: Tue Jun 23 07:17:59 GMT+2 2026

Total time taken to generate the page: 0.00514 seconds