Bonjour à tous
Voila j'ai une fenetre de type FrameWnd, j'aimerais savoir quand la fenetre a finis d'etre redimensionnée....
D'aprés la MSDN, nous avons :
The framework calls this member function after the window's size has changed.
|
|---|
afx_msgvoidOnSize( UINTnType, intcx, intcy); |
Parameters
- nType
Specifies the type of resizing requested. This parameter can be one of the following values:
SIZE_MAXIMIZED Window has been maximized.
SIZE_MINIMIZED Window has been minimized.
SIZE_RESTORED Window has been resized, but neither SIZE_MINIMIZED nor SIZE_MAXIMIZED applies.
SIZE_MAXHIDE Message is sent to all pop-up windows when some other window is maximized.
Or si je place un messageBox dans la fonction :
void COGREPlugin::OnSize(UINT nType, int cx, int cy)
{
if( NULL != m_pRenderWindow )
{
CRect rect;
GetClientRect(rect);
m_pRenderWindow->windowMovedOrResized();
if(rect.Height() != 0 && m_pCamera != NULL)
{
m_pCamera->setAspectRatio((Ogre::Real)rect.Width()/(Ogre::Real)rect.Height());
}
}
if( nType == SIZE_RESTORED )
{
MessageBox(_T("Finishresize!") );
}
IEmbeddedPlugin::OnSize(nType, cx, cy);
}
et ben, je reçois "FinishResize!" dès que la fenetre a été redimensionné de 1 pixel !!! elle se comporte donc comme ON_SIZING !!
Cela provient du réglage par defaut sur XP: "show windows contents while draging"...
Avant il n'y avait pas se problème...
comment peut on changer cela ? comment savoir quand la fenetre a réélement finit de se redimensionner ? cela eviterai que ma fenetre OpenGL clignote quand je redimensionne ! car a se moment la j'arreterais de repaindre ;)
merci de votre aide