How to fit a CWnd in a Pane? |
Post Reply |
Author | |
HuyLe
Newbie Joined: 10 August 2006 Location: Canada Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 10 August 2006 at 12:40pm |
Hi,
I have derived a class hvlOpenGLWnd from CWnd to display OpenGL.
I have created a pane:
CXTPDockingPane* _pPane = _pPaneManager->CreatePane(HVL_ID, CRect(0, 0, 140, 600), xtpPaneDockBottom);
I have created a window:
hvlOpenGLWnd m_Wnd;
m_Wnd.Create (_T("STATIC"), L"Hi", WS_CHILD | WS_VISIBLE,CRect(0, 0, 140, 600), _pMainWnd, 1234);
and attached the window:
_pPane->Attach(&m_Wnd); How to make the CWnd fit in the pane when I resize the pane? With the current code, changing the pane size with the mouse will not resize the window. The Window always stays 140x600.
Thanks,
HVL |
|
Barto
Groupie Joined: 27 February 2005 Location: Germany Status: Offline Points: 60 |
Post Options
Thanks(0)
|
how about catching WM_SIZE in your hvlOpenGLWnd and adjusting the glViewport ? Worked for me..
void CGLWnd::OnSizeGL(int cx, int cy)
{ // set correspondence between window and OGL viewport glViewport(0, 0, cx, cy); } |
|
HuyLe
Newbie Joined: 10 August 2006 Location: Canada Status: Offline Points: 2 |
Post Options
Thanks(0)
|
Thanks, for some reason my message Map was wrong, your reply helps me to detect the problem. Especially since Microsoft debugger does not want to correlate the source code to the binary therefore I can't debug... Something I need to investigate in order to continue my development. Regards,
Huy Le
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |