forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Changing the colour of a button

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
steeld
Valued Newbie


Joined: 03 May 2006
Posts: 26
Location: Cambridge, UK

PostPosted: Tue May 09, 2006 9:17 am    Post subject: Changing the colour of a button Reply with quote

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
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue May 09, 2006 10:52 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
kOt
Contributor
Contributor


Joined: 19 Jan 2004
Posts: 89
Location: Fyffe, AL

PostPosted: Wed May 31, 2006 1:27 pm    Post subject: Reply with quote

You could "instead" use images for buttons Very Happy
any colors you want

_________________
Visual Dialogscript 5
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jun 01, 2006 12:36 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Jun 01, 2006 2:50 pm    Post subject: Reply with quote

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 Cool and very easy to use. I would suggest everyone get a copy of it. Wink

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group