15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Implementing Radio Buttons

Mike Bryga -- MBryga@PickSys.com
Thursday, January 23, 1997

Environment: MSVC 4.0, Win 95/NT 4.0=09

I've used AppWizard to subclass the Button control and am confused about =
how to implement mutual exclusion when using the Radio button =
personality in a frame (Group Box personality of a Button control).=20

The on-line docs say that an AutoRadio button will do this, but that I =
will have to implement it for a (manual) radio button, and mention =
WS_GROUP.=20

I do not understand the documentation on WS_GROUP...
=B7	WS_GROUP   Specifies the first control of a group of controls in =
which the user can move from one control to the next with the arrow =
keys. All controls defined with the WS_GROUP style after the first =
control belong to the same group. The next control with the WS_GROUP =
style ends the style group and starts the next group (that is, one group =
ends where the next begins).=B7=09
How do I differentiate between two small groups and one large group if =
all controls in the group have WS_GROUP _and_ one group ends where the =
next begins?

Well, AutoRadio buttons work great, but I don't understand what I have =
to implement in my (manual) Radio buttons. I can set my check state, but =
how do I clear the one that was checked (or clear all the others)? Your =
advise is appreciated.

Thanks, I've been going around in circles on these problems for too long =
now. Mike





Rondal C. Ellifritt -- rondal@mvision.com
Monday, January 27, 1997

Mike Bryga wrote:
>=20
> Environment: MSVC 4.0, Win 95/NT 4.0
>=20
> [snip]
>=20
> I do not understand the documentation on WS_GROUP...
> =B7       WS_GROUP   Specifies the first control of a group of controls=
 in
> which the user can move from one control to the next with the arrow key=
s.
> All controls defined with the WS_GROUP style after the first control
> belong to the same group. The next control with the WS_GROUP style ends
> the style group and starts the next group (that is, one group ends wher=
e
> the next begins).=B7
> How do I differentiate between two small groups and one large group if =
all
> controls in the group have WS_GROUP _and_ one group ends where the next
> begins?

This is a doc bug. The line in the doc should read "All controls defined=20
_without_ the WS_GROUP style after the first control belong to the same=20
group." This makes the next sentence make sense (and should make your rad=
io=20
buttons work correctly).

Rondal
--=20
_________________________________________________________________________=
___
Rondal C. Ellifritt                                       rondal@mvision.=
com



Greg D. Tighe -- gdt@eng.aisinc.com
Monday, January 27, 1997

> Environment: MSVC 4.0, Win 95/NT 4.0	
> 
> I do not understand the documentation on WS_GROUP...
> =B7	WS_GROUP   Specifies the first control of a group of controls in 
>which the user can move from one control to the next with the arrow 
>keys. All controls defined with the WS_GROUP style after the first 
>control belong to the same group. The next control with the WS_GROUP 
>style ends the style group and starts the next group (that is, one group =
ends where the next begins).
>
> How do I differentiate between two small groups and one large group 
>if all controls in the group have WS_GROUP _and_ one group ends where 
>the next begins?
> 
That doesn't seem right - you should only specify the WS_GROUP style 
for the first radiobutton in each group.  Perhaps where it says, "All 
controls defined with the WS_GROUP style after the first control 
belong to the same group." we need to change 'WS_GROUP' to 'Auto'.

	-Greg Tighe
	Applied Intelligent Systems, Inc.
	Ann Arbor, MI
	gdt@aisinc.com




| Вернуться в корень Архива |