I'm writing code to draw an owner-drawn button, and I'm having trouble figuring out how to disable it. Or to get it to look disabled, that is: When I set its window style to be disabled, that looks fine, but it still looks just like a usable button.
The button contains text and a bitmap, so to draw each button, I use DrawFrameControl() to draw the button outline, TextOut() to draw the text, and BitBlt() to copy the bitmap from a preliminary hdc to a memory device context. Then I use BitBlt() again to copy the memory device context to the button's DRAWITEMSTRUCT's device context.
This works fine for enabled buttons, but I can't figure out how to do it for disabled buttons, with graphics appropriately embossed and everything. The only thing I've found in online help is a function called DrawState, which seems to be poorly suited to this purpose, or should I be trying to use it for that?