资源描述:
《社区视频监控系统源代码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、第一步粘贴代码CBitmapm_BKGround;CStringm_Caption;BOOLm_IsMax;CButtonStatem_ButtonState;//按钮状态intm_BorderWidth;//边框宽度intm_BorderHeight;//边框高度intm_FrameWidth;//窗体D宽度intm_FrameHeight;//窗体D高度intm_CaptionHeight;//标题栏的高度intm_TitleDrawHeight;//标题栏实际的绘制高度intm_ButtonWidt
2、h;//按钮位图宽度intm_ButtonHeight;//按钮位图高度COLORREFm_CapitonColor;//标题字体颜色CFontm_CaptionFont;//标题字体BOOLm_IsDrawForm;CRectm_LTitleRc,m_MTitleRc,m_RTitleRc;//左,中,右标题显示区域CRectm_MinRect,m_MaxRect,m_CloseRect;//标题栏按钮的显示区域第二步粘贴代码//CCaptureDlgdialog#defineFLEFTBAR1//左边
3、框#defineFLEFTTITLE2//左标题#defineFRIGHTTITLE4//右标题#defineFMIDTITLE8//中间标题#defineFRIGHTBAR16//右边框#defineFBOTTOMBAR32//底边框#defineFMINBUTTON64//最小化按钮#defineFMAXBUTTON128//最大化按钮#defineFCLOSEBUTTON256//关闭按钮#defineFALL511//所有标识#defineMAXNUM100//按钮状态Onlintdialog//
4、加载背景位图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_CH
5、ARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_ROMAN,"宋体");CBitmapbitmap;bitmap.LoadBitmap(IDB_MINBT);BITMAPINFObInfo;bitmap.GetObject(sizeof(bInfo),&bInfo);m_ButtonWidth=bInfo.bmiHeader.biWidth;m_ButtonHeight=bInfo.bmiHeader.biHeight;bit
6、map.DeleteObject();CcaptureDialog右键添加成员函数voidDrawDialog(UINTFlags)public//获得边框信息m_FrameHeight=GetSystemMetrics(SM_CYFIXEDFRAME);m_BorderHeight=GetSystemMetrics(SM_CYBORDER);m_FrameWidth=GetSystemMetrics(SM_CXFIXEDFRAME);m_BorderWidth=GetSystemMetrics(SM_C
7、XBORDER);m_CaptionHeight=GetSystemMetrics(SM_CYCAPTION);CRectClientrect;GetClientRect(Clientrect);CRectWinRC,FactRC;GetWindowRect(WinRC);FactRC.CopyRect(CRect(0,0,WinRC.Width(),WinRC.Height()));//获取窗口设备上下文CWindowDCWindowDC(this);CBitmapLeftLine,*OldObj;BI
8、TMAPINFObitinfo;CDCmemDC;memDC.CreateCompatibleDC(&WindowDC);intleftwidth=0;//左标题的宽度intrightwidth=0;//右标题的宽度intleftlinewidth=0;//窗体边框和3D宽度intrLineWidth;intbLineHeight;DeleteObject(LeftLine);LeftLine.LoadBitmap(IDB_R