| View previous topic :: View next topic |
| Author |
Message |
steeld Valued Newbie

Joined: 03 May 2006 Posts: 26 Location: Cambridge, UK
|
Posted: Tue May 09, 2006 9:17 am Post subject: Changing the colour of a button |
|
|
I see that a STYLE might be applied to a button dialog element but the foreground and background colours are ignored? Is this supposed to work? Is there another way of changing the button colour from grey to, say, red for a stop button?
Thanks _________________ David |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue May 09, 2006 10:52 am Post subject: |
|
|
The button elements FOREGROUND and BACKGROUND colors are
determined and set thru your systems registry.
The only way I know to change the color of a button is to intercept the
WM_CTLCOLORBTN message. I'm not sure that that is possible with just
VDS alone. However, if I'm not mistaken, Mac's vdsug.dll or vdsapi.dll is
capable of doing this for you. Both dll's are freeware. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
kOt Contributor

Joined: 19 Jan 2004 Posts: 89 Location: Fyffe, AL
|
Posted: Wed May 31, 2006 1:27 pm Post subject: |
|
|
You could "instead" use images for buttons
any colors you want _________________ Visual Dialogscript 5 |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Jun 01, 2006 12:36 am Post subject: |
|
|
I may be mistaken, but I believe CodeScript has provided an example to do
this (VDSGUI?) _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jun 01, 2006 2:50 pm Post subject: |
|
|
The initial default colors for all elements are stored through the windows registry. It is up to the application if it wants to use those colors or not. The WM_CTLCOLORBTN message will not change the colors if you do not respond properly to the message. I don't think VDS, vdsug.dll, or vdsapi.dll has the ability to respond to the WM_CTLCOLORBTN.
CodeScript's VDSGUI.DLL is the only one I know for sure will work since it sub-classes the VDS elements and makes them owner drawn which means the DLL has the ability to change the colors on the fly. His DLL is very very and very easy to use. I would suggest everyone get a copy of it.  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|