天天看點

mfc對話框設定對話框的背景色

在OnPaint事件的else裡面添加

void CMyDlg::OnPaint() //

{

if (IsIconic())

{

}else

{

CPaintDC dc(this); // device context for painting

CRect rect;

GetClientRect(&rect);

dc.FillSolidRect(&rect, RGB(255, 255, 255));

}

}

繼續閱讀