Okay, I tried with the following code:
I also tried:Code:void CMFCTest4View::OnInitialUpdate() { CFormView::OnInitialUpdate(); //Create the Properties Sheet if(!m_wndPropSheet.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP)) { TRACE0("Failed to create toolbar\n"); //return -1; // fail to create } GetParentFrame()->RecalcLayout(); ResizeParentToFit(); //Make Properties Sheet visible m_wndPropSheet.MoveWindow(128,128,300,300,true); }
Code://Make Properties Sheet visible RECT rectParent; GetParentFrame()->GetWindowRect(&rectParent); m_wndPropSheet.MoveWindow(rectParent.left, rectParent.top, rectParent.right-rectParent.left, rectParent.top-rectParent.bottom, true);
But now I get an "Assertion Failed" right at startup. It is triggered by CWnd::MoveWindow()
More specifically the following Assertion fails:
Any hint on how to resolve this would be very much appreciated.Code:void CWnd::MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint) { ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL)); [...] }
Regards,
Daniel.





Reply With Quote