Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8e238d04
Commit
8e238d04
authored
May 29, 1999
by
Luc Tourangeau
Committed by
Alexandre Julliard
May 29, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reimplemented the CheckRadioButton function.
parent
bbafc7a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
22 deletions
+41
-22
dialog.c
windows/dialog.c
+41
-22
No files found.
windows/dialog.c
View file @
8e238d04
...
...
@@ -62,6 +62,14 @@ typedef struct
BOOL
dialogEx
;
}
DLG_TEMPLATE
;
/* Radio button group */
typedef
struct
{
UINT
firstID
;
UINT
lastID
;
UINT
checkID
;
}
RADIOGROUP
;
/* Dialog base units */
static
WORD
xBaseUnit
=
0
,
yBaseUnit
=
0
;
...
...
@@ -1593,41 +1601,52 @@ BOOL16 WINAPI CheckRadioButton16( HWND16 hwndDlg, UINT16 firstID,
/***********************************************************************
* CheckRadioButton32 (USER32.48)
* CheckRB
*
* Callback function used to check/uncheck radio buttons that fall
* within a specific range of IDs.
*/
BOOL
WINAPI
CheckRadioButton
(
HWND
hwndDlg
,
UINT
firstID
,
UINT
lastID
,
UINT
checkID
)
static
BOOL
CALLBACK
CheckRB
(
HWND
hwndChild
,
LPARAM
lParam
)
{
WND
*
pWnd
=
WIN_FindWndPtr
(
hwndDlg
);
if
(
!
pWnd
)
return
FALSE
;
LONG
lChildID
=
GetWindowLongA
(
hwndChild
,
GWL_ID
);
RADIOGROUP
*
lpRadioGroup
=
(
RADIOGROUP
*
)
lParam
;
for
(
WIN_UpdateWndPtr
(
&
pWnd
,
pWnd
->
child
);
pWnd
;
WIN_UpdateWndPtr
(
&
pWnd
,
pWnd
->
next
))
if
((
pWnd
->
wIDmenu
==
firstID
)
||
(
pWnd
->
wIDmenu
==
lastID
))
if
((
lChildID
>=
lpRadioGroup
->
firstID
)
&&
(
lChildID
<=
lpRadioGroup
->
lastID
))
{
break
;
}
if
(
!
pWnd
)
return
FALSE
;
if
(
pWnd
->
wIDmenu
==
lastID
)
lastID
=
firstID
;
/* Buttons are in reverse order */
while
(
pWnd
)
if
(
lChildID
==
lpRadioGroup
->
checkID
)
{
SendMessageA
(
pWnd
->
hwndSelf
,
BM_SETCHECK
,
(
pWnd
->
wIDmenu
==
checkID
),
0
);
if
(
pWnd
->
wIDmenu
==
lastID
)
SendMessageA
(
hwndChild
,
BM_SETCHECK
,
BST_CHECKED
,
0
);
}
else
{
WIN_ReleaseWndPtr
(
pWnd
);
break
;
SendMessageA
(
hwndChild
,
BM_SETCHECK
,
BST_UNCHECKED
,
0
);
}
WIN_UpdateWndPtr
(
&
pWnd
,
pWnd
->
next
);
}
return
TRUE
;
}
/***********************************************************************
* CheckRadioButton32 (USER32.48)
*/
BOOL
WINAPI
CheckRadioButton
(
HWND
hwndDlg
,
UINT
firstID
,
UINT
lastID
,
UINT
checkID
)
{
RADIOGROUP
radioGroup
;
/* perform bounds checking for a radio button group */
radioGroup
.
firstID
=
min
(
min
(
firstID
,
lastID
),
checkID
);
radioGroup
.
lastID
=
max
(
max
(
firstID
,
lastID
),
checkID
);
radioGroup
.
checkID
=
checkID
;
return
EnumChildWindows
(
hwndDlg
,
(
WNDENUMPROC
)
CheckRB
,
(
LPARAM
)
&
radioGroup
);
}
/***********************************************************************
* GetDialogBaseUnits (USER.243) (USER32.233)
*/
DWORD
WINAPI
GetDialogBaseUnits
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment