Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!usc!snorkelwacker.mit.edu!mit-eddie!uw-beaver!ubc-cs!unixg.ubc.ca!cheddar.ucs.ubc.ca!ballard From: ballard@cheddar.ucs.ubc.ca (Alan Ballard) Newsgroups: comp.os.os2.programmer Subject: Re: Help with invalidating AutoRadio?Buttons? Keywords: AutoRadioButtons PM Message-ID: <1991Jan31.035417.21142@unixg.ubc.ca> Date: 31 Jan 91 03:54:17 GMT References: <1991Jan30.232544.12606@eecs.wsu.edu> Sender: news@unixg.ubc.ca (Usenet News Maintenance) Organization: Computing Services, University of British Columbia Lines: 23 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