[comp.os.os2.programmer] Modifying Button Appearance

jwh@bodwin.ifs.umich.edu (Jim Howe) (02/02/91)

Without resorting to a user drawn button, is there a way to change
the appearance of button controls that are displayed on either 
dialog or regular windows?  For example, can you change the foreground,
background colors, font used for the text, etc.?  I want to be able
to do this on an individual button basis, i.e. in one window I might
want to have a red button, a blue button and a green button.  Any
help would be appreciated.

James W. Howe			   internet: jwh@ifs.umich.edu
University of Michigan             uucp:     uunet!mailrus!ifs.umich.edu!jwh
Ann Arbor, MI   48103-4943         

ballard@cheddar.ucs.ubc.ca (Alan Ballard) (02/02/91)

In article <1991Feb1.191251.14548@terminator.cc.umich.edu> jwh@bodwin.ifs.umich.edu (Jim Howe) writes:
>Without resorting to a user drawn button, is there a way to change
>the appearance of button controls that are displayed on either 
>dialog or regular windows?  For example, can you change the foreground,
>background colors, font used for the text, etc.?  
 
With OS/2 1.2 and later, you can set all of these with the WinSetPresParam
API.  See Vol 4 of the Microsoft Programmer's reference. 



Alan Ballard                   | Internet: ballard@ucs.ubc.ca
University Computing Services  |   Bitnet: USERAB1@UBCMTSG
University of British Columbia |    Phone: 604-228-3074
Vancouver B.C. Canada V6R 1W5  |      Fax: 604-228-5116

ibmman@eng.clemson.edu (Larry Salomon) (02/27/91)

From article <1991Feb1.191251.14548@terminator.cc.umich.edu>, by jwh@bodwin.ifs.umich.edu (Jim Howe):
> Without resorting to a user drawn button, is there a way to change
> the appearance of button controls that are displayed on either 
> dialog or regular windows?  For example, can you change the foreground,
> background colors, font used for the text, etc.?  I want to be able
> to do this on an individual button basis, i.e. in one window I might
> want to have a red button, a blue button and a green button.  Any
> help would be appreciated.

I never actually did this, but I'm 99% sure you can use WinSetPresParam
to change all kinds of things if you know what to pass as arguments (I don't).

Cheers,
Q