Setting Font and Text Colors items of ComboBox
-
At first I thought I could set the above values in DrawItem (I have an ownerdraw combobox). The Drawitem however only gets invoked when clicking the right icon after the display I have tried OnCtlColor in the dialog (for the text color) It does get invoked but doesnt set the text color. Tried OnCreate in ComboBox for the font for that it just didn't get invoked Thanks
-
At first I thought I could set the above values in DrawItem (I have an ownerdraw combobox). The Drawitem however only gets invoked when clicking the right icon after the display I have tried OnCtlColor in the dialog (for the text color) It does get invoked but doesnt set the text color. Tried OnCreate in ComboBox for the font for that it just didn't get invoked Thanks
Presubclasswindntrolow got the font working Then I re-read remarks on CTLCOLOR seems like for a combobox the message is sent to the combobox as it is the parent to the edit control and list box However the ctlcolor for the combobox only got called twice and both times had a value CTLCOLOREDIT maybe the idea is then to set the color of the listbox in the Drawitem Thanks
-
Presubclasswindntrolow got the font working Then I re-read remarks on CTLCOLOR seems like for a combobox the message is sent to the combobox as it is the parent to the edit control and list box However the ctlcolor for the combobox only got called twice and both times had a value CTLCOLOREDIT maybe the idea is then to set the color of the listbox in the Drawitem Thanks
I gave yu a link to a CP article: [Re: OwnerDraw Combox - C / C++ / MFC Discussion Boards](https://www.codeproject.com/Messages/5877909/Re-OwnerDraw-Combox) Did you look at it?
-
I gave yu a link to a CP article: [Re: OwnerDraw Combox - C / C++ / MFC Discussion Boards](https://www.codeproject.com/Messages/5877909/Re-OwnerDraw-Combox) Did you look at it?