OnSize appelé avant OnInitDialog?
Bonjour,
pour un CDialog
est ce que le premier appel de OnSize est avant OnInitDialog?
j'ai placé une View pView , initialisé dans OnInitDialog dans le code en bas
dans OnSize j'ai voulu la replacé
en faisant un if (pView) pView->MoveWindow(..)
le code compile mais ça plante dès le demarrage
comment je pourrai faire, déclarer la View dès le constructeur?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| CWnd* pFrameWnd = this;
pContext.m_pCurrentDoc = new CMyDocument;
pContext.m_pNewViewClass = RUNTIME_CLASS(CMyVw);
pView =(CMyVw *) ((CFrameWnd*)pFrameWnd)->CreateView(&pContext);
ASSERT(pView);
pView->ShowWindow(SW_NORMAL);
CRect rectWindow;
//GetWindowRect(rectWindow);
rectWindow.top=65;
rectWindow.bottom=465;
rectWindow.left=10;
rectWindow.right=410;
pView->MoveWindow(rectWindow); |
Merci.