user32: msgbox: Make buttons an own control group.
Signed-off-by: Joachim Priesner <joachim.priesner@web.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e0a7021e7a
commit
217fe9cfad
@ -115,12 +115,14 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
|
|||||||
TRACE_(msgbox)("%s\n", debugstr_w(lpszText));
|
TRACE_(msgbox)("%s\n", debugstr_w(lpszText));
|
||||||
SetWindowTextW(GetDlgItem(hwnd, MSGBOX_IDTEXT), lpszText);
|
SetWindowTextW(GetDlgItem(hwnd, MSGBOX_IDTEXT), lpszText);
|
||||||
|
|
||||||
/* Remove not selected buttons */
|
/* Remove not selected buttons and assign the WS_GROUP style to the first button */
|
||||||
|
hItem = 0;
|
||||||
switch(lpmb->dwStyle & MB_TYPEMASK) {
|
switch(lpmb->dwStyle & MB_TYPEMASK) {
|
||||||
case MB_OK:
|
case MB_OK:
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDCANCEL));
|
DestroyWindow(GetDlgItem(hwnd, IDCANCEL));
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case MB_OKCANCEL:
|
case MB_OKCANCEL:
|
||||||
|
hItem = GetDlgItem(hwnd, IDOK);
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDABORT));
|
DestroyWindow(GetDlgItem(hwnd, IDABORT));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDRETRY));
|
DestroyWindow(GetDlgItem(hwnd, IDRETRY));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDIGNORE));
|
DestroyWindow(GetDlgItem(hwnd, IDIGNORE));
|
||||||
@ -130,6 +132,7 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
|
|||||||
DestroyWindow(GetDlgItem(hwnd, IDCONTINUE));
|
DestroyWindow(GetDlgItem(hwnd, IDCONTINUE));
|
||||||
break;
|
break;
|
||||||
case MB_ABORTRETRYIGNORE:
|
case MB_ABORTRETRYIGNORE:
|
||||||
|
hItem = GetDlgItem(hwnd, IDABORT);
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDOK));
|
DestroyWindow(GetDlgItem(hwnd, IDOK));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDCANCEL));
|
DestroyWindow(GetDlgItem(hwnd, IDCANCEL));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDYES));
|
DestroyWindow(GetDlgItem(hwnd, IDYES));
|
||||||
@ -141,6 +144,7 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
|
|||||||
DestroyWindow(GetDlgItem(hwnd, IDCANCEL));
|
DestroyWindow(GetDlgItem(hwnd, IDCANCEL));
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case MB_YESNOCANCEL:
|
case MB_YESNOCANCEL:
|
||||||
|
hItem = GetDlgItem(hwnd, IDYES);
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDOK));
|
DestroyWindow(GetDlgItem(hwnd, IDOK));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDABORT));
|
DestroyWindow(GetDlgItem(hwnd, IDABORT));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDRETRY));
|
DestroyWindow(GetDlgItem(hwnd, IDRETRY));
|
||||||
@ -149,6 +153,7 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
|
|||||||
DestroyWindow(GetDlgItem(hwnd, IDTRYAGAIN));
|
DestroyWindow(GetDlgItem(hwnd, IDTRYAGAIN));
|
||||||
break;
|
break;
|
||||||
case MB_RETRYCANCEL:
|
case MB_RETRYCANCEL:
|
||||||
|
hItem = GetDlgItem(hwnd, IDRETRY);
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDOK));
|
DestroyWindow(GetDlgItem(hwnd, IDOK));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDABORT));
|
DestroyWindow(GetDlgItem(hwnd, IDABORT));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDIGNORE));
|
DestroyWindow(GetDlgItem(hwnd, IDIGNORE));
|
||||||
@ -158,6 +163,7 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
|
|||||||
DestroyWindow(GetDlgItem(hwnd, IDTRYAGAIN));
|
DestroyWindow(GetDlgItem(hwnd, IDTRYAGAIN));
|
||||||
break;
|
break;
|
||||||
case MB_CANCELTRYCONTINUE:
|
case MB_CANCELTRYCONTINUE:
|
||||||
|
hItem = GetDlgItem(hwnd, IDCANCEL);
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDOK));
|
DestroyWindow(GetDlgItem(hwnd, IDOK));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDABORT));
|
DestroyWindow(GetDlgItem(hwnd, IDABORT));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDIGNORE));
|
DestroyWindow(GetDlgItem(hwnd, IDIGNORE));
|
||||||
@ -165,6 +171,9 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
|
|||||||
DestroyWindow(GetDlgItem(hwnd, IDNO));
|
DestroyWindow(GetDlgItem(hwnd, IDNO));
|
||||||
DestroyWindow(GetDlgItem(hwnd, IDRETRY));
|
DestroyWindow(GetDlgItem(hwnd, IDRETRY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hItem) SetWindowLongW(hItem, GWL_STYLE, GetWindowLongW(hItem, GWL_STYLE) | WS_GROUP);
|
||||||
|
|
||||||
/* Set the icon */
|
/* Set the icon */
|
||||||
switch(lpmb->dwStyle & MB_ICONMASK) {
|
switch(lpmb->dwStyle & MB_ICONMASK) {
|
||||||
case MB_ICONEXCLAMATION:
|
case MB_ICONEXCLAMATION:
|
||||||
|
@ -75,7 +75,6 @@ MSGBOX DIALOG 100, 80, 216, 168
|
|||||||
STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
BEGIN
|
BEGIN
|
||||||
ICON "", MSGBOX_IDICON, 8, 20, 16, 16, WS_CHILD | WS_VISIBLE
|
ICON "", MSGBOX_IDICON, 8, 20, 16, 16, WS_CHILD | WS_VISIBLE
|
||||||
LTEXT "", MSGBOX_IDTEXT, 32, 4, 176, 48, WS_CHILD | WS_VISIBLE | WS_GROUP | SS_NOPREFIX
|
|
||||||
PUSHBUTTON "OK", IDOK, 16, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
PUSHBUTTON "OK", IDOK, 16, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||||
PUSHBUTTON "Cancel", IDCANCEL, 74, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
PUSHBUTTON "Cancel", IDCANCEL, 74, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||||
PUSHBUTTON "&Abort", IDABORT, 132, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
PUSHBUTTON "&Abort", IDABORT, 132, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||||
@ -86,6 +85,7 @@ BEGIN
|
|||||||
PUSHBUTTON "&Try Again", IDTRYAGAIN, 422, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
PUSHBUTTON "&Try Again", IDTRYAGAIN, 422, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||||
PUSHBUTTON "&Continue", IDCONTINUE, 480, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
PUSHBUTTON "&Continue", IDCONTINUE, 480, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||||
PUSHBUTTON "Help", IDHELP, 538, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
PUSHBUTTON "Help", IDHELP, 538, 56, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||||
|
LTEXT "", MSGBOX_IDTEXT, 32, 4, 176, 48, WS_CHILD | WS_VISIBLE | WS_GROUP | SS_NOPREFIX
|
||||||
END
|
END
|
||||||
|
|
||||||
MDI_MOREWINDOWS DIALOG 20, 20, 232, 122
|
MDI_MOREWINDOWS DIALOG 20, 20, 232, 122
|
||||||
|
Loading…
x
Reference in New Issue
Block a user