本文介绍了onCtlColor的最后一个参数的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

afx_msg HBRUSH OnCtlColor(
   CDC* pDC,
   CWnd* pWnd,
   UINT nCtlColor 
);


这里的combobox的值nCtlColor是什么.我已经尝试过CTLCOLOR_EDIT.但是它不起作用.请帮帮我..

谢谢你..

Jijesh


here what will be the value of ''nCtlColor'' for combobox.i''ve tried with CTLCOLOR_EDIT.but its not working.please help me..

Thank you in advance..

Jijesh

推荐答案

if( IDC_EDIT == pWnd->GetDlgCtrlID())
{
}



if(CTLCOLOR_EDIT == nCtlColor)
{
}
将考虑该对话框中的所有编辑控件.希望为所有编辑控件设置通用颜色.
if(CTLCOLOR_LISTBOX == nCtlColor)//为所有列表控件设置通用颜色



if( CTLCOLOR_EDIT == nCtlColor )
{
}
will consider for all edit controls in that dialog. like to set a common color for all edit cntrol.
if( CTLCOLOR_LISTBOX == nCtlColor )//to set a common color for all list control



这篇关于onCtlColor的最后一个参数的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 10:42