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
cb0c81ae
Commit
cb0c81ae
authored
Jun 30, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Jul 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Allow for custom icons in confirmation messages.
parent
e5b9a79c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
shlfileop.c
dlls/shell32/shlfileop.c
+15
-1
No files found.
dlls/shell32/shlfileop.c
View file @
cb0c81ae
...
...
@@ -67,11 +67,15 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
typedef
struct
{
HINSTANCE
hIconInstance
;
UINT
icon_resource_id
;
UINT
caption_resource_id
,
text_resource_id
;
}
SHELL_ConfirmIDstruc
;
static
BOOL
SHELL_ConfirmIDs
(
int
nKindOfDialog
,
SHELL_ConfirmIDstruc
*
ids
)
{
ids
->
hIconInstance
=
NULL
;
ids
->
icon_resource_id
=
IDI_WARNING
;
switch
(
nKindOfDialog
)
{
case
ASK_DELETE_FILE
:
ids
->
caption_resource_id
=
IDS_DELETEITEM_CAPTION
;
...
...
@@ -99,6 +103,7 @@ BOOL SHELL_ConfirmDialogW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir)
{
WCHAR
szCaption
[
255
],
szText
[
255
],
szBuffer
[
MAX_PATH
+
256
];
SHELL_ConfirmIDstruc
ids
;
MSGBOXPARAMSW
params
;
if
(
!
SHELL_ConfirmIDs
(
nKindOfDialog
,
&
ids
))
return
FALSE
;
...
...
@@ -109,7 +114,16 @@ BOOL SHELL_ConfirmDialogW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir)
FormatMessageW
(
FORMAT_MESSAGE_FROM_STRING
|
FORMAT_MESSAGE_ARGUMENT_ARRAY
,
szText
,
0
,
0
,
szBuffer
,
sizeof
(
szBuffer
),
(
va_list
*
)
&
szDir
);
return
(
IDOK
==
MessageBoxW
(
hWnd
,
szBuffer
,
szCaption
,
MB_OKCANCEL
|
MB_ICONEXCLAMATION
));
ZeroMemory
(
&
params
,
sizeof
(
params
));
params
.
cbSize
=
sizeof
(
MSGBOXPARAMSW
);
params
.
hwndOwner
=
hWnd
;
params
.
hInstance
=
ids
.
hIconInstance
;
params
.
lpszText
=
szBuffer
;
params
.
lpszCaption
=
szCaption
;
params
.
lpszIcon
=
(
LPWSTR
)
MAKEINTRESOURCE
(
ids
.
icon_resource_id
);
params
.
dwStyle
=
MB_OKCANCEL
|
MB_USERICON
;
return
(
IDOK
==
MessageBoxIndirectW
(
&
params
));
}
static
DWORD
SHELL32_AnsiToUnicodeBuf
(
LPCSTR
aPath
,
LPWSTR
*
wPath
,
DWORD
minChars
)
...
...
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