FontColor and button - is it possible to change?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

FontColor and button - is it possible to change?

Post by Pablo César »

Hola Daniel,

Disponibilizé en Fixed and enhanced SAMPLES dos nuevos ejemplos para el USER_COMPONENTS e intenté efetivar el estilo BS_OWNERDRAW para el nuevo botón. Asi poderíamos cambiar el FontColor del caption. Pero no conseguí, solo consegui mejorar adicionando las propiedades largura, alto y MULTILINE.

Espero que te guste. Le pedí ayuda a Claudio. Pero si tenés alguna sugerencia, hacemela saber.

Un abraço,

---

Hello Daniel,

I made available in Fixed and enhanced SAMPLES two new examples for the USER_COMPONENTS and tried to effect the style BS_OWNERDRAW for the new button. So we could change the Caption FontColor. But I did not get it, I just got better by adding the properties of width, height and MULTILINE.

I hope you like it. I asked Claudio for help. But if you have any suggestions, let me know.

A hug,
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
KDJ
Posts: 243
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland

Re: FontColor and button - is it possible to change?

Post by KDJ »

This is my implementation of buttons with BS_OWNERDRAW style:
Attachments
OwnButton.zip
(5.87 KiB) Downloaded 372 times
OwnButton.png
OwnButton.png (14.39 KiB) Viewed 7197 times
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: FontColor and button - is it possible to change?

Post by danielmaximiliano »

Gracis por compartir Pablo..

pero es domingo !!!!!
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
serge_girard
Posts: 3312
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: FontColor and button - is it possible to change?

Post by serge_girard »

Thanks, Krystof!
Brilliant!

Serge
There's nothing you can do that can't be done...
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

FontColor and button - is it possible to change?

Post by Pablo César »

danielmaximiliano wrote:Gracis por compartir Pablo..

pero es domingo !!!!!
Fué Krzysztof (KDJ) que lo hizo ( yo no sé hacerlo :oops: ). Yo estaba tomando un Cabernet Sauvignon de Chile y jugando con mis sobrinitos que me vinieron a visitar...
KDJ wrote:This is my implementation of buttons with BS_OWNERDRAW style
Simply amazing... I love it.

How good it is to have people with knowledge and willingness to help colleagues in the forum.

I am amazed and very pleased to know that our friend Claudio, Roberto, Rathinagiri and many can count on truly unselfish people in our community.

Many thanks Krzysztof.
Image
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2220
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: FontColor and button - is it possible to change?

Post by srvet_claudio »

KDJ wrote:This is my implementation of buttons with BS_OWNERDRAW style:
Nice work!!!

PD: A suggestion: should be used to draw the button the api functions that draw with the style of Windows active theme, otherwise the button is flat and the other controls are drawn by superimposing layers of images that recreate the active theme. This is the way that Windows draws controls with active theme.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

FontColor and button - is it possible to change?

Post by Pablo César »

srvet_claudio wrote:suggestion: should be used to draw the button the api functions that draw with the style of Windows active theme
Yes, good ! It's what is needing to be perfect.

Gracias Claudio for important tip and Krzysztof for you great work.

Both, my masters. When I grow up ... I want to be like all of you!

Image
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
gfilatov
Posts: 1090
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: FontColor and button - is it possible to change?

Post by gfilatov »

srvet_claudio wrote:
KDJ wrote:This is my implementation of buttons with BS_OWNERDRAW style:
Nice work!!!

PD: A suggestion: should be used to draw the button the api functions that draw with the style of Windows active theme, otherwise the button is flat and the other controls are drawn by superimposing layers of images that recreate the active theme. This is the way that Windows draws controls with active theme.
Hi,

Congratulations :!:

It is a very good work with the deep knowledges of WinAPI :!:

Please take a look for an image below (what we have in Minigui Ex)
Attachments
ButtonEx control with color support in Minigui Ex
ButtonEx control with color support in Minigui Ex
obutton.png (493.48 KiB) Viewed 7065 times
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
Post Reply