~cpp
BOOL CCxDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
if (!CDocument::OnOpenDocument(lpszPathName))
return FALSE;
// TODO: Add your specialized creation code here
m_pImage = new CxImage;
m_pImage->Load(lpszPathName, CxImage::FindType(lpszPathName));
return TRUE;
}