Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f69d88b5
Commit
f69d88b5
authored
Jun 17, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Destroy the unused buttons in a message box instead of only hiding them.
parent
ae942d61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
37 deletions
+37
-37
msgbox.c
dlls/user32/msgbox.c
+37
-37
No files found.
dlls/user32/msgbox.c
View file @
f69d88b5
...
...
@@ -122,55 +122,55 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
TRACE_
(
msgbox
)(
"%s
\n
"
,
debugstr_w
(
lpszText
));
SetWindowTextW
(
GetDlgItem
(
hwnd
,
MSGBOX_IDTEXT
),
lpszText
);
/*
Hid
e not selected buttons */
/*
Remov
e not selected buttons */
switch
(
lpmb
->
dwStyle
&
MB_TYPEMASK
)
{
case
MB_OK
:
ShowWindow
(
GetDlgItem
(
hwnd
,
IDCANCEL
),
SW_HIDE
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDCANCEL
)
);
/* fall through */
case
MB_OKCANCEL
:
ShowWindow
(
GetDlgItem
(
hwnd
,
IDABORT
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDRETRY
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDIGNORE
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDYES
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDNO
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDTRYAGAIN
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDCONTINUE
),
SW_HIDE
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDABORT
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDRETRY
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDIGNORE
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDYES
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDNO
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDTRYAGAIN
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDCONTINUE
)
);
break
;
case
MB_ABORTRETRYIGNORE
:
ShowWindow
(
GetDlgItem
(
hwnd
,
IDOK
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDCANCEL
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDYES
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDNO
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDCONTINUE
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDTRYAGAIN
),
SW_HIDE
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDOK
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDCANCEL
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDYES
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDNO
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDCONTINUE
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDTRYAGAIN
)
);
break
;
case
MB_YESNO
:
ShowWindow
(
GetDlgItem
(
hwnd
,
IDCANCEL
),
SW_HIDE
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDCANCEL
)
);
/* fall through */
case
MB_YESNOCANCEL
:
ShowWindow
(
GetDlgItem
(
hwnd
,
IDOK
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDABORT
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDRETRY
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDIGNORE
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDCONTINUE
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDTRYAGAIN
),
SW_HIDE
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDOK
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDABORT
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDRETRY
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDIGNORE
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDCONTINUE
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDTRYAGAIN
)
);
break
;
case
MB_RETRYCANCEL
:
ShowWindow
(
GetDlgItem
(
hwnd
,
IDOK
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDABORT
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDIGNORE
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDYES
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDNO
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDCONTINUE
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDTRYAGAIN
),
SW_HIDE
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDOK
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDABORT
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDIGNORE
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDYES
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDNO
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDCONTINUE
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDTRYAGAIN
)
);
break
;
case
MB_CANCELTRYCONTINUE
:
ShowWindow
(
GetDlgItem
(
hwnd
,
IDOK
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDABORT
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDIGNORE
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDYES
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDNO
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hwnd
,
IDRETRY
),
SW_HIDE
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDOK
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDABORT
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDIGNORE
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDYES
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDNO
)
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDRETRY
)
);
}
/* Set the icon */
switch
(
lpmb
->
dwStyle
&
MB_ICONMASK
)
{
...
...
@@ -201,9 +201,9 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
break
;
}
/*
Hid
e Help button unless MB_HELP supplied */
/*
Remov
e Help button unless MB_HELP supplied */
if
(
!
(
lpmb
->
dwStyle
&
MB_HELP
))
{
ShowWindow
(
GetDlgItem
(
hwnd
,
IDHELP
),
SW_HIDE
);
DestroyWindow
(
GetDlgItem
(
hwnd
,
IDHELP
)
);
}
/* Position everything */
...
...
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