Originally posted by: eric
Hi,Koay Kah Hoe
At first,thanks for your great work!
Just add one line to the demo programm,you can prevent user from manipulating the original mainframe
window during
printpreview:
void CGridCtrl::PrintPreview()
{
if (m_bPrintPreview)
{
AfxGetApp()->m_pMainWnd->SetFocus();
return;
}
CFrameWnd* pOldFrame=(CFrameWnd*)AfxGetThread()->m_pMainWnd;
pOldFrame->ShowWindow(SW_HIDE); //added by eric
...
}
As you can see,before we replace the original mainframe
window,just hide it,so the user cannot manipulate it
anymore untill they close the preview window.