home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / tools / 1696 < prev    next >
Encoding:
Text File  |  1992-12-14  |  2.0 KB  |  59 lines

  1. Newsgroups: comp.os.ms-windows.programmer.tools
  2. Path: sparky!uunet!mcsun!sunic!aun.uninett.no!ugle.unit.no!ugle.unit.no!torstein
  3. From: torstein@itekiris.kjemi.unit.no (torstein hansen)
  4. Subject: Re: Borland's RESource manager
  5. In-Reply-To: jagrant@emr1.emr.ca's message of Mon, 14 Dec 1992 01:00:10 GMT
  6. Message-ID: <TORSTEIN.92Dec14183304@itekiris.kjemi.unit.no>
  7. Sender: news@ugle.unit.no (NetNews Administrator)
  8. Organization: Dept. of Chem.Eng, Norwegian Inst. of Tech
  9. References: <Bz7woH.M49@news.cso.uiuc.edu> <1992Dec14.010010.17900@emr1.emr.ca>
  10. Date: 14 Dec 92 18:33:04
  11. Lines: 46
  12.  
  13. In article <1992Dec14.010010.17900@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
  14.    In article <Bz7woH.M49@news.cso.uiuc.edu> duff@cs.uiuc.edu writes:
  15.    >I began making my first .RES file using the Toolkit last night, and I
  16.    >finished the "pretty" part of making it, but I'm having trouble understanding
  17.    >how to make one set of Radio buttons allow the user to ONLY choose ONE
  18.    >of five buttons.  What I mean to say is, I have five buttons, GROUPED,
  19.    >and I want the user to be able to choose one of them and have ONLY that one
  20.    >highlighted.  Do I have to do that from my calling program, or
  21.    >can I set that up in the .RES ?
  22.          1. give each one an ID (ID_RB1,ID_RB2,...ID_RB5)
  23.          2. in the DlgProc for the dialog box, handle the messages
  24.         as follows:
  25.            case WM_COMMAND:
  26.              id=(int)wparam;
  27.              switch(id){
  28.                ID_RB1:
  29.                ID_RB2:
  30.                ID_RB3:
  31.                ID_RB4:
  32.                ID_RB5: CheckRadioButton(hdlg,ID_RB1,ID_RB5,id);
  33.                    break;
  34.  
  35. You could just as well set it up in your res file.
  36. Using the Resource Workshop editor:
  37.   Double click the first radio button of the group
  38.   Set button type to "Auto radio button"
  39.   Make sure "Tab stop" atttribute is set
  40.   for the rest of your buttons:
  41.     Double click button 2..lastbutton
  42.     Set button type to "Auto radio button"
  43.     Remove any "Tab stop" attribute of the button
  44. And that's it!
  45.  
  46. (Rest deleted...)
  47.  
  48. Good luck!
  49.  
  50. Torstein
  51.  
  52.  
  53.  
  54.  
  55.  
  56. --
  57. Torstein Hansen
  58. torstein@itekiris.kjemi.unit.no
  59.