One DrawItem Function for both CStatic and CComboBox
-
Hi is there a way to have one DrawItem Function if you have both a derived CStatic and CComboBox a function pointer to the drawitem function. The Function itself takes into consideration both a static and combbox. Not sure because the complier looks to see if you decalred a Drawitem for either a static or combobox
-
Hi is there a way to have one DrawItem Function if you have both a derived CStatic and CComboBox a function pointer to the drawitem function. The Function itself takes into consideration both a static and combbox. Not sure because the complier looks to see if you decalred a Drawitem for either a static or combobox
-
There is quite a difference between the two classes so it would not be easy. You could provide a DrawItem method for each which then calls out to a helper function to do the actual work.
-
That’s is not a bad idea Richard this may not be conventional but I think I’ll make the code part of DLL I have and pass the drawitemstruct
I have done vaguely similar things in the past, although not with these specific controls. And it should work the same whether it is part of the application or the DLL. The only requirement should be (I hope) that the code can distinguish if necessary between the two controls.
-
I have done vaguely similar things in the past, although not with these specific controls. And it should work the same whether it is part of the application or the DLL. The only requirement should be (I hope) that the code can distinguish if necessary between the two controls.