I'm trying to create a very simple SDI application that contains an "Edit Control". This component must fill all available space at initialization and when the window size changes.
I replace all CFormView references by CBCGPFormView
//Added to dock the Edit Control (IDC_EDIT1)
CBCGPStaticLayout* pLayout = (CBCGPStaticLayout*)GetLayout();
if (pLayout != NULL)
pLayout->AddAnchor(IDC_EDIT1, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeBoth);
The method "AddAnchor" causes "Debug Assertion Failed" in bcgplayout.cpp
if (m_pHostWnd->GetSafeHwnd () == NULL) => TRUE
When I create a simple application based on CBCGPDialog (with layout definitions in OnInitDialog method) it works perfectly.
Is "OnInitialUpdate" the good place to set my layout definitions ?
Thanks in advance,