cwindowswinapibuttonwm-paint

How to draw a Windows button in WM_PAINT?


I'd like to build a custom Windows button without subclassing it.

I simply want to draw it, like I would draw a rectangle by calling FillRect().

How do I call the window procedure registered by the BUTTON window class that performs the painting?

update

As noted in the comments, I want to draw an image that looks like a button without having a child window that is a button.


Solution

  • By Andreas Rejbrand:

    Old style: DrawFrameControl. New style: DrawThemeBackground, DrawThemeText, etc.