Custom draw button using uxtheme.dll

Posted by Javier De Pedro on Stack Overflow See other posts from Stack Overflow or by Javier De Pedro
Published on 2010-05-04T09:21:38Z Indexed on 2010/05/04 9:28 UTC
Read the original article Hit count: 399

Filed under:
|
|

I have implemented my custom button inheriting from CButton and drawing it by using uxtheme.dll (DrawThemeBackground with BP_PUSHBUTTON).

Everything works fine but I have two statuses (Normal and Pressed) which Hot status is the same. It means when the user places the cursor over the button it is drawn alike regardless the button status (Pressed or not).

This is a bit confusing to the user and I would like to change the way the button is drawn in Pressed & Hot status. Does anybody know a way?

I have also thought about custumizing the whole drawing but the buttons use gradients, borders, shadows, etc. So it is not easy to achive the same look&feel drawing everything by myself. Is there a way to find the source code of the dll or know how to do it?

Thanks in advance.

Javier

© Stack Overflow or respective owner

Related posts about cbutton

Related posts about custom