h-lee%hogum.utah.edu@cs.utah.edu (LEE Hyo Jong) (01/29/91)
Hi, I guess everybody knows that it is possible to control menu items able/disable in OS/2 PM programming. Organization: University of Utah CS Dept But, is it possible to control radio buttons able/disable during execution of the program? Since a radio button is a window, conceptually it should be able to control it by sending messages. If we create radio buttons individually by calling WinCreateWindow(), it is not a problem - may be called with WS_DISABLED. However, many radio buttons are usually created by WinCreateDlg() or WinLoadDlg(). I cannot find the apropriate message name for this case. So, how can I control radio buttons able/disable? Thanks in advance, -hjl --------------- LEE, Hyo Jong - OI - 801-581-8377 (office) 801-582-5127 (home) ({ihnp4,decvax}!utah-cs!h-lee, h-lee@cs.utah.edu)
bobn@mcs213c.cs.umr.edu (Bob Niedergerke) (01/29/91)
In article <1991Jan28.122408.11150@hellgate.utah.edu> h-lee%hogum.utah.edu@cs.utah.edu (LEE Hyo Jong) writes: >Hi, > >Is it possible to control radio buttons able/disable during execution >of the program? >Since a radio button is a window, conceptually it should be able to control it >by sending messages. If we create radio buttons individually by calling >WinCreateWindow(), it is not a problem - may be called with WS_DISABLED. > >However, many radio buttons are usually created by WinCreateDlg() or >WinLoadDlg(). I cannot find the apropriate message name for this case. >So, how can I control radio buttons able/disable? Thanks in advance, I am miles away from the manuals, but basically, it works like this: Run WinEnable against the individual radio button, with the message parameter FALSE. I believe this is the correct API. To get the window parameter that WinEnable needs, call WinWinFromID with the ID of the radio button. This should work equally well with any of the dialog box controls. Hope this helps. bobn