How to change button text color in NM_CUSTOMDRAW (Win32 API question)
Vinod K Chandran
kcvinu82 at gmail.com
Wed Mar 17 12:36:30 UTC 2021
On Wednesday, 17 March 2021 at 06:39:26 UTC, Imperatorn wrote:
>
> Good that you solved it, that wasn't what I thought the
> solution would be 👀
I was sure about i can solve this through NM_CUSTOMDRAW. Because,
in VB .net, we can change back color & fore color of button. On
the same time, there is an option to turn on the OwnerDrawStyle.
If we set this property true, we need to draw the button on our
own. So i am pretty sure that, that property will turn a normal
button to an owner drawn button. But if we don't use that
property, then also we can change the button colors. So that
means, without using BS_OWNERDRAW style, we can change the
colors. And that's the NM_CUSTOMDRAW message. Unfortunately,
there is not much tutorials or documentation about handling this
message in a Button's case. We can find some examples and
articles related to ListView & Treeview. But not a single line of
documentation about buttons.
>
> Was more than 10 years ago since I was "the king of win api" 😔
Glad to know that. Can you write an article about how to use Gdi+
in win api apps ? Now I am using gdi. But i want to test how gdi+
works on win32 apps.
More information about the Digitalmars-d-learn
mailing list