home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.tools
- Path: sparky!uunet!mcsun!sunic!aun.uninett.no!ugle.unit.no!ugle.unit.no!torstein
- From: torstein@itekiris.kjemi.unit.no (torstein hansen)
- Subject: Re: Borland's RESource manager
- In-Reply-To: jagrant@emr1.emr.ca's message of Mon, 14 Dec 1992 01:00:10 GMT
- Message-ID: <TORSTEIN.92Dec14183304@itekiris.kjemi.unit.no>
- Sender: news@ugle.unit.no (NetNews Administrator)
- Organization: Dept. of Chem.Eng, Norwegian Inst. of Tech
- References: <Bz7woH.M49@news.cso.uiuc.edu> <1992Dec14.010010.17900@emr1.emr.ca>
- Date: 14 Dec 92 18:33:04
- Lines: 46
-
- In article <1992Dec14.010010.17900@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
- In article <Bz7woH.M49@news.cso.uiuc.edu> duff@cs.uiuc.edu writes:
- >I began making my first .RES file using the Toolkit last night, and I
- >finished the "pretty" part of making it, but I'm having trouble understanding
- >how to make one set of Radio buttons allow the user to ONLY choose ONE
- >of five buttons. What I mean to say is, I have five buttons, GROUPED,
- >and I want the user to be able to choose one of them and have ONLY that one
- >highlighted. Do I have to do that from my calling program, or
- >can I set that up in the .RES ?
- 1. give each one an ID (ID_RB1,ID_RB2,...ID_RB5)
- 2. in the DlgProc for the dialog box, handle the messages
- as follows:
- case WM_COMMAND:
- id=(int)wparam;
- switch(id){
- ID_RB1:
- ID_RB2:
- ID_RB3:
- ID_RB4:
- ID_RB5: CheckRadioButton(hdlg,ID_RB1,ID_RB5,id);
- break;
-
- You could just as well set it up in your res file.
- Using the Resource Workshop editor:
- Double click the first radio button of the group
- Set button type to "Auto radio button"
- Make sure "Tab stop" atttribute is set
- for the rest of your buttons:
- Double click button 2..lastbutton
- Set button type to "Auto radio button"
- Remove any "Tab stop" attribute of the button
- And that's it!
-
- (Rest deleted...)
-
- Good luck!
-
- Torstein
-
-
-
-
-
- --
- Torstein Hansen
- torstein@itekiris.kjemi.unit.no
-