求解读代码者
程序代码:
{CRect rect; CSize winSize; int cx, cy = 0; CControlBar* pBar; pBar = GetControlBar(AFX_IDW_STATUS_BAR); if((pBar ! =NULL) && (pBar -> IsWindowVisible())){ pBar ->GetWindowRect (rect); winSize = rect. Size (); cy+=(winSize. cy);} pBar=GetControlBar(AFX_IDW_ TOOLBAR); if((pBar!=NULL)&&(pBar ->IsWindowVisible())){ pBar -> GetWindowRect(rect); winSize = rect.Size (); cy+=(winSize. Cy*2);} cx = 384+(384-m_clientSize. cx); cy += (192+(192-m_clientSize. cy)); GetWindowRect(rect); SetWindowPos(this,rect. left,rect.top, cx, cy, SWP_ NOZORDER);} OnViewStatusBar(){ CFrameWnd::OnBarCheck(ID_VIEW_STATUS_BAR); SetClientSize();} CDC* pDC=GetDC(); LOGFONT m _lFont; COLORREF m_cTextColor; CFont myFont; CFont* pOldFont; CFontDialog FontDlg; FontDlg. m_cf. lpLogFont=&m_lFont; FontDlg.m_cf.rgbColors=m_cTextColor; FontDlg. m_cf. Flags!=CF_INITTOLOGFONTSTRUCT; if ( FontDlg. DoModal() = =IDOK) { FontDlg.GetCurrentFont(&m_1Font); m_cTextColor = FontDlg.GetColor(); }