0
回答
mfc中HotKey控件字体颜色如何修改
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   
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);
}
但是控件字体颜色,应该如何解决
<无标签>
举报
ybheb
发帖于4年前 0回/159阅
顶部