// FeatureLibFrame.cpp : implementation file // #include "stdafx.h" #include "ImageGrinder.h" #include "FeatureLibFrame.h" #include "ImageGrinderDoc.h" ///////////////////////////////////////////////////////////////////////////// // CFeatureLibFrame IMPLEMENT_DYNCREATE(CFeatureLibFrame, CMDIChildWnd) CFeatureLibFrame::CFeatureLibFrame() { } CFeatureLibFrame::~CFeatureLibFrame() { } BEGIN_MESSAGE_MAP(CFeatureLibFrame, CMDIChildWnd) //{{AFX_MSG_MAP(CFeatureLibFrame) ON_WM_CLOSE() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CFeatureLibFrame message handlers void CFeatureLibFrame::Create(CMDIFrameWnd *Parent) { CMDIChildWnd::Create(NULL,"Feature Library",WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_CHILD,rectDefault,Parent); CRect rct; DiagPanel=new CFeatureLibDiag; DiagPanel->Create(CFeatureLibDiag::IDD,this); DiagPanel->GetWindowRect(&rct); SetWindowPos(NULL,0,0, rct.Width()+GetSystemMetrics(SM_CXSIZEFRAME)*2, rct.Height()+GetSystemMetrics(SM_CXSIZEFRAME)+GetSystemMetrics(SM_CYCAPTION), SWP_NOZORDER|SWP_NOMOVE); DiagPanel->ShowWindow(SW_SHOW); } void CFeatureLibFrame::OnClose() { // TODO: Add your message handler code here and/or call default //CMDIChildWnd::OnClose(); } void CFeatureLibFrame::SetDocument(CImageGrinderDoc *igdoc) { CString str; str.Format("Feature Library (%s)",igdoc->GetTitle()); SetWindowText(str); //DiagPanel->SetDocument(igdoc); }