Hi everybody,

Here a strange problem for me.

In the OnInitialUpdate of my CView class, I disable buttons and control lists because no data is loaded.

When the user opens a file, in my CMyDoc::Serialize function, I tell my view to enable buttons. But it doesn't work. Look at this code.

void CMyDoc::Serialize(...)
{
if(!ar.IsStoring())
{
...
POSITION pos = GetFirstViewPosition();
CMyView* pView = (CMyView*) GetNextView(pos);
pView->EnableTheControls();
}
}
...
void CMyView::EnableTheControls()
{
CButton* pButton = (CButton*) GetDlgItem(IDC_BUTTON);
pButton->EnableWindow(TRUE);
}

The code below doesn't work, the controls are still disable. Can someone tell me why ? I try the UpdateWindow() function also in the CMyView function but I don't get anything more. Please help !