The CMFCButton
has the BS_OWNERDRAW
style set by default - you can remove it in the OnInitDialog()
for your dialog:
mfcButton.ModifyStyle(BS_OWNERDRAW, 0, 0);
However, removing the owner draw style results in many of the methods of CMFCButton being rendered useless (e.g. SetTextColor). You can get the button to render using the current windows theme by setting up the visual manager:
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
This is done instead of the ModifyStyle
above, resulting in buttons that fit the default style but still have the newer rendering features.
Steve Beedie
2009-09-23 12:12:04