void CMainFrame::DrawTitleBar(CDC *pDC) { // TODO: 在此处添加消息处理程序代码 // 不为绘图消息调用 CFrameWnd::OnNcPaint() pDC->SelectStockObject(NULL_BRUSH); pDC->SelectStockObject(NULL_PEN); CRect rtWnd, rtTitle, rtButtons; GetWindowRect(&rtWnd); //取得标题栏的位置 //SM_CXFRAME 窗口边框的边缘宽度 //SM_CYFRAME 窗口边框的边缘高度 //SM_CXSIZE 窗口标题栏宽度 //SM_CYSIZE 窗口标题栏高度 rtTitle.left = GetSystemMetrics(SM_CXFRAME); rtTitle.top = GetSystemMetrics(SM_CYFRAME); rtTitle.right = rtWnd.right - rtWnd.left - GetSystemMetrics(SM_CXFRAME); rtTitle.bottom = rtTitle.top + GetSystemMetrics(SM_CYSIZE); CPoint point; //填充顶部框架 point.x = rtWnd.Width(); point.y = GetSystemMetrics(SM_CYSIZE) + GetSystemMetrics(SM_CYFRAME) + 0; pDC->Rectangle(0, 0, point.x, point.y); //填充左侧框架 point.x = GetSystemMetrics(S
确定对话框框架边框的大小及重绘
最新推荐文章于 2022-09-27 16:15:27 发布