gooopil pfiew | Hello, voila, le code suivant me genere un "debug assertion failed".
Code :
- BOOL CMainFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/,
- CCreateContext* pContext)
- {
- if (m_wndSplitter.CreateStatic(this,1,2))
- {
- CRect rect;
- GetClientRect(&rect);
- CSize size = rect.Size();
- size.cy-=150;
- if (m_wndSplitter2.CreateStatic(&m_wndSplitter,2,1))
- {
- if (m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CChatView),size,pContext))
- {
- if (m_wndSplitter2.CreateView(1,0,RUNTIME_CLASS(CSendView),CSize(0,0),pContext))
- {
- if (m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CInfoVw),CSize(0,0), pContext))
- {
- //SetActiveView((CView*)m_wndSplitter2.GetPane(1,0));
- return TRUE;
- }
- }
- }
- }
- }
- return FALSE;
- }
|
Je suis parti de ce code (qui marche...) :
Code :
- BOOL CMainFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/,
- CCreateContext* pContext)
- {
- if (m_wndSplitter.CreateStatic(this,2,1))
- {
- CRect rect;
- GetClientRect(&rect);
- CSize size = rect.Size();
- size.cy-=150;
- if (m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CChatView),size,pContext))
- {
- if (m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CSendView),CSize(0,0),pContext))
- {
- SetActiveView((CView*)m_wndSplitter.GetPane(1,0));
- return TRUE;
- }
- }
- }
- return FALSE;
- }
|
Si quelqu'un a une idée...
Merci  |