Click here to Skip to main content
15,908,175 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
afx_msg HBRUSH OnCtlColor(
   CDC* pDC,
   CWnd* pWnd,
   UINT nCtlColor 
);

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
Posted
v2

nCtlColor is the control type, edit box, dialog, list box etc..
your dialog box has an edit control??if your are trying to check if some control's id matching use the code
if( IDC_EDIT == pWnd->GetDlgCtrlID())
{
}


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
 
Share this answer
 
CTLCOLOR_LISTBOX is the value of nCtlColor
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900