[comp.os.os2.programmer] Help with invalidating AutoRadio?Buttons?

wbonner@eecs.wsu.edu (Wim Bonner) (01/31/91)

I'm trying to have a series of autoradio buttons, and make some of them
not selectable.  Is there a simple message that I can send to the button
which will tell it that it is invalid as a mouse coice?  I would prefer that
the text and button would go to  a grey color as well, to indicate the 
non-selectable nature.

Wim

-- 
|  wbonner@yoda.eecs.wsu.edu  |
| 27313853@wsuvm1.csc.wsu.edu |
|   27313853@Wsuvm1.BITNET    |
|  72561.3135@CompuServe.com  |

slh@wolf.cs.washington.edu (Scott Heyano) (01/31/91)

In article <1991Jan30.232544.12606@eecs.wsu.edu> wbonner@yoda.UUCP (Wim Bonner) writes:
|I'm trying to have a series of autoradio buttons, and make some of them
|not selectable.  Is there a simple message that I can send to the button
|which will tell it that it is invalid as a mouse coice?  I would prefer that
|the text and button would go to  a grey color as well, to indicate the 
|non-selectable nature.
|
	Disable them, I believe the function is WinEnableWindow().

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

In article <1991Jan30.232544.12606@eecs.wsu.edu> wbonner@yoda.UUCP (Wim Bonner) writes:
>I'm trying to have a series of autoradio buttons, and make some of them
>not selectable.  Is there a simple message that I can send to the button
>which will tell it that it is invalid as a mouse coice?  I would prefer that
>the text and button would go to  a grey color as well, to indicate the 
>non-selectable nature.
>
Sure; you use WinEnableWindow.  Generally with WinWindowFromId to get the
handle for the control. 
  
Something like:
   WinEnableWindow(WinWindowFromId(hwnd, IDD_xxx), FALSE);
 
where hwnd is the dialog box handle, IDD_xxx is the ID for the control,
and the last parameter is FALSE to disable and TRUE to enable.
 
(You can also do it by sending a mesage to the control, which is what
the above does indirectly.)
 
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