I’m trying to make some static controls transparent on a windows dialog, but I’m having difficulty with one windows message.
Windows happily sends me a WM_CTLCOLORSTATIC message when drawing static controls, but this message is also sent to readonly and disabled edit controls. So – given just a hwnd to the control, how can I tell what kind of control it is?
You could call GetClassName i.e
You’d then have to do a bunch of string compares based on the string i.e “Button” – so not great but should work.