Re: multiple language support: dialog-boxes
ok I`ve tried to add a demo modification in the OnUpdate() handler.
void CMLSampleView::OnUpdate(CView* pSender, LPARAM lHint, CObject*
pHint)
{
if(pSender == NULL)
return; //after startup oninitialupdate
CButton * button = (CButton *)pSender->GetDlgItem(IDC_CHECK1);
UINT test = button->GetCheck();
if(button->GetCheck() == BST_CHECKED)
TRACE("checked\n");
CView::OnUpdate (pSender, lHint, pHint);
}
It`s only a small demo - I already know that GetDlgItem is not the
best solution as well as the general id - but it should only help me
to get an idea.... of how it could / should work...
Moreover all checkboxes or other information from the dialog has to be
checked and stored in private variables in the view-class?? And loaded
to the new language dialog box?
Therefore I added following lines to the code above
CDocument *pDoc = pOldView->GetDocument();
pDoc->AddView(m_pNewView);
pDoc->UpdateAllViews(pOldView);
So there`s first of all the old-view loaded (and the onupdate-method
for this oldview to store all these information) - and after that the
new view OnUpdate()-method is loaded to get these information back
from the private variables from the document...