2 pièce(s) jointe(s)
lancer une scrollview depuis un bouton de dialogue
Bonjour
la source est joint
j'ai un scrollview fait avec l'app wizard qui marche bien
j'ai refait un nouveau projet de Dialog simple, sur lequel le bouton map doit lancer la scrollview
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| void CTestDlg::OnMap()
{
// TODO: Add your control notification handler code here
CCreateContext pContext;
CWnd* pFrameWnd = this;
pContext.m_pCurrentDoc = new CGirishDoc;
pContext.m_pNewViewClass = RUNTIME_CLASS(CGirishView);
CGirishView *pView =(CGirishView *) ((CFrameWnd*)pFrameWnd)->CreateView(&pContext);
//ASSERT(pView);
pView->ShowWindow(SW_SHOW);
CRect rectWindow;
GetWindowRect(rectWindow);
rectWindow.right += 15;
rectWindow.top -= 10;
pView->MoveWindow(rectWindow);
} |
CGirishView est ma scrollview
des que je clique, quelquechose apparait mais ça plante
je joint aussi la scrollview sans dialog (Girish), celle-la marche, mais je veux pouvoir la lancer depuis un dialoque