mfc中HotKey控件字体颜色如何修改

ybheb 发布于 2013/09/13 12:34
阅读 171
收藏 0
MyHotKey.h
class CMyHotKey: public CHotKeyCtrl
{
   DECLARE_DYNAMIC(CMyHotKey)
   protected:
   DECLARE_MESSAGE_MAP()
   public: 
   afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
};
MyHotKey.cpp    
BEGIN_MESSAGE_MAP(CMyHotkey, CHotKeyCtrl) 
   ON_WM_CTLCOLOR_REFLECT()
END_MESSAGE_MAP()
HBRUSH CMyHotKey::CtlColor(CDC* pDC, UINT nCtlColor)
{
   if(pDC)
   {
       pDC->SetTextColor(RGB(255,0,0));
       pDC->SetBkMode(TRANSPARENT);
   }
   return (HBRUSH)GetStockObject(NULL_BRUSH);
}
但是控件字体颜色,应该如何解决
加载中
返回顶部
顶部