Article View: comp.os.ms-windows.programmer.tools
Article #619Re: Borland's RESource manager
From: torstein hansen
Date: Mon, 14 Dec 1992 18:33
Date: Mon, 14 Dec 1992 18:33
46 lines
2126 bytes
2126 bytes
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
Technical Details
Message-ID:
<TORSTEIN.92Dec14183304@itekiris.kjemi.unit.no>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!aun.uninett.no!ugle.unit.no!ugle.unit.no!torsteinReferences:
<Bz7woH.M49@news.cso.uiuc.edu> <1992Dec14.010010.17900@emr1.emr.ca>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.tools Path: arc1-ca.pugleaf.net!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