CMFCButton控件改变颜色

CMFCButton* button = new CMFCButton;
RECT buttonRect;
buttonRect.left = 200;
buttonRect.right = 400;
buttonRect.top = 200;
buttonRect.bottom = 400;

button->Create("测试按钮", WS_CHILD | WS_VISIBLE | BS_OWNERDRAW , buttonRect, this, IDC_BUTTON_1);		
button->m_bDontUseWinXPTheme = TRUE;
button->m_bTransparent = FALSE;
button->m_bDrawFocus = FALSE;
button->m_nFlatStyle = CMFCButton::BUTTONSTYLE_3D;
		
button->SetFaceColor(RGB(0, 200, 200));
button->SetTextColor(RGB(0, 0, 0));

参考链接: https://blog.csdn.net/zxccaoya/article/details/54142523

猜你喜欢

转载自blog.csdn.net/HHCOO/article/details/86620395