没有颜色选项 的 字体对话框
原文:http://blog.csdn.net/joeblackzqq/article/details/7164198,文章条理清晰,尤其代码图片使用恰到好处。
主要思路:
1、重载CFontDialog类。
2、添加OnInitDialog()函数,其中颜色控件的ID号,使用Spy++捕捉。
BOOL CMyFontDialong::OnInitDialog()   
{
CFontDialog::OnInitDialog();
      
CWnd* pStatic = GetDlgItem(0x473); // 0x473: 静态文本框,"颜色:"
CWnd* pComboBox = GetDlgItem(0x443); // 0x443:ComboBox:,"颜色下拉框"
pStatic->ShowWindow(SW_HIDE);
pComboBox->ShowWindow(SW_HIDE);
      
return TRUE; // return TRUE unless you set the focus to a control
{
CFontDialog::OnInitDialog();
CWnd* pStatic = GetDlgItem(0x473); // 0x473: 静态文本框,"颜色:"
CWnd* pComboBox = GetDlgItem(0x443); // 0x443:ComboBox:,"颜色下拉框"
pStatic->ShowWindow(SW_HIDE);
pComboBox->ShowWindow(SW_HIDE);
return TRUE; // return TRUE unless you set the focus to a control
}   
posted on 2013-05-22 19:20 Waaaaaall-E 阅读(157) 评论(0) 收藏 举报
                    
                
                
            
        
浙公网安备 33010602011771号