各位大侠如何更改窗体边框的颜色?

解决方案 »

  1.   

    为了不影响其他程序的外观,最好自画
    处理 WM_NCPAINT
      

  2.   

    void CAaDlg::OnNcPaint() 
    {
    // TODO: Add your message handler code here
    CDialog::OnNcPaint();
    HDC hDC = ::GetWindowDC(GetSafeHwnd());
    ::MoveToEx(hDC, 0, 0, NULL);
    RECT Rect;
    ::GetWindowRect(GetSafeHwnd(), &Rect);
    ::LineTo(hDC, 0, Rect.bottom - Rect.top);
    }
      

  3.   

    健一个刷子
    m_brush.CreateSolidBrush(RGB(105,170,252));
    然后添加OnCtlColor响应函数,参考msdn就可以设置颜色,比如增加
    setbkcolor();settextcolor();etc....