注册 登录
编程论坛 C++教室

求解读代码者

tianbian210 发布于 2010-04-13 23:04, 383 次点击
程序代码:
{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();


 }
0 回复
1