第一步粘贴代码 CBitmap m_BKGround; CString m_Caption; BOOL m_IsMax; CButtonState m_ButtonState; //按钮状态 int m_BorderWidth; //边框宽度 int m_BorderHeight; //边框高度 int m_FrameWidth ; //窗体 D 宽度 int m_FrameHeight; //窗体 D 高度 int m_CaptionHeight; //标题栏的高度 int m_TitleDrawHeight; //标题栏实际的绘制高度 int m_ButtonWidth; //按钮位图宽度 int m_ButtonHeight; //按钮位图高度 COLORREF m_CapitonColor; //标题字体颜色 CFont m_CaptionFont; //标题字体 BOOL m_IsDrawForm ; CRect m_LTitleRc, m_MTitleRc,m_RTitleRc; //左,中,右标题显示区域 CRect m_MinRect,m_MaxRect,m_CloseRect; //标题栏按钮的显示区域 第二步粘贴代码 // CCaptureDlg dialog #define FLEFTBAR 1 //左边框 #define FLEFTTITLE 2 //左标题 #define FRIGHTTITLE 4 //右标题 #define FMIDTITLE 8 //中间标题 #define FRIGHTBAR 16 //右边框 #define FBOTTOMBAR 32 //底边框 #define FMINBUTTON 64 //最小化按钮 #define FMAXBUTTON 128 //最大化按钮 #define FCLOSEBUTTON 256 //关闭按钮 #define FALL 511 //所有标识 #define MAXNUM 100 //按钮状态 Onlintdialog //加载背景位图 m_BKGround.LoadBitmap(IDB_BKGROUND); m_BorderHeight = GetSystemMetrics(SM_CYBORDER); m_BorderWidth = GetSystemMetrics(SM_CXBORDER); m_CaptionHeight = GetSystemMetrics(SM_CYCAPTION); SetWindowText(m_Caption); m_CaptionFont.CreateFont(14,10,0,3,600,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_ROMAN,"宋体"); CBitmap bitmap; bitmap.LoadBitmap(IDB_MINBT); BITMAPINFO bInfo; bitmap.GetObject(sizeof(bInfo),&bInfo); m_ButtonWidth = bInfo.bmiHeader.biWidth; m_ButtonHeight = bInfo.bmiHeader.biHeight; bitmap.DeleteObject(); CcaptureDialog 右键添加成员函数void DrawDialog(UINT Flags) public //获得边框信息 m_FrameHeight = GetSystemMetrics(SM_CYFIXEDFRAME); m_BorderHeight = GetSystemMetrics(SM_CYBORDER); m_FrameWidth = GetSystemMetrics(SM_CXFIXEDFRAME); m_BorderWidth = GetSystemMetrics(SM_CXBORDER); m_Capt...