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
783b855f
Commit
783b855f
authored
Oct 21, 2008
by
Andrey Turkin
Committed by
Alexandre Julliard
Oct 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Do not pass resource ids to MessageBox.
parent
79bbddd4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
9 deletions
+28
-9
wordpad.c
programs/wordpad/wordpad.c
+28
-9
No files found.
programs/wordpad/wordpad.c
View file @
783b855f
...
...
@@ -116,6 +116,25 @@ static void DoLoadStrings(void)
LoadStringW
(
hInstance
,
STRING_UNITS_CM
,
units_cmW
,
MAX_STRING_LEN
);
}
/* Show a message box with resource strings */
static
int
MessageBoxWithResStringW
(
HWND
hWnd
,
LPCWSTR
lpText
,
LPCWSTR
lpCaption
,
UINT
uType
)
{
MSGBOXPARAMSW
params
;
params
.
cbSize
=
sizeof
(
params
);
params
.
hwndOwner
=
hWnd
;
params
.
hInstance
=
GetModuleHandleW
(
0
);
params
.
lpszText
=
lpText
;
params
.
lpszCaption
=
lpCaption
;
params
.
dwStyle
=
uType
;
params
.
lpszIcon
=
NULL
;
params
.
dwContextHelpId
=
0
;
params
.
lpfnMsgBoxCallback
=
NULL
;
params
.
dwLanguageId
=
0
;
return
MessageBoxIndirectW
(
&
params
);
}
static
void
AddButton
(
HWND
hwndToolBar
,
int
nImage
,
int
nCommand
)
{
TBBUTTON
button
;
...
...
@@ -289,7 +308,7 @@ static void on_sizelist_modified(HWND hwndSizeList, LPWSTR wszNewFontSize)
}
else
{
SetWindowTextW
(
hwndSizeList
,
sizeBuffer
);
MessageBoxW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_INVALID_NUMBER
),
MessageBoxW
ithResStringW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_INVALID_NUMBER
),
wszAppTitle
,
MB_OK
|
MB_ICONINFORMATION
);
}
}
...
...
@@ -747,8 +766,8 @@ static void DoOpenFile(LPCWSTR szOpenFileName)
else
if
(
!
memcmp
(
STG_magic
,
fileStart
,
sizeof
(
STG_magic
)))
{
CloseHandle
(
hFile
);
MessageBoxW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_OLE_STORAGE_NOT_SUPPORTED
),
wszAppTitle
,
MB_OK
|
MB_ICONEXCLAMATION
);
MessageBoxW
ithResStringW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_OLE_STORAGE_NOT_SUPPORTED
)
,
wszAppTitle
,
MB_OK
|
MB_ICONEXCLAMATION
);
return
;
}
}
...
...
@@ -863,7 +882,7 @@ static void DialogSaveFile(void)
{
if
(
fileformat_flags
(
sfn
.
nFilterIndex
-
1
)
!=
SF_RTF
)
{
if
(
MessageBoxW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_SAVE_LOSEFORMATTING
),
if
(
MessageBoxW
ithResStringW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_SAVE_LOSEFORMATTING
),
wszAppTitle
,
MB_YESNO
|
MB_ICONEXCLAMATION
)
!=
IDYES
)
{
continue
;
...
...
@@ -1161,7 +1180,7 @@ static void HandleCommandLine(LPWSTR cmdline)
}
if
(
opt_print
)
MessageBoxW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_PRINTING_NOT_IMPLEMENTED
),
wszAppTitle
,
MB_OK
);
MessageBoxW
ithResStringW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_PRINTING_NOT_IMPLEMENTED
),
wszAppTitle
,
MB_OK
);
}
static
LRESULT
handle_findmsg
(
LPFINDREPLACEW
pFr
)
...
...
@@ -1239,7 +1258,7 @@ static LRESULT handle_findmsg(LPFINDREPLACEW pFr)
if
(
ret
==
-
1
)
{
pFr
->
lCustData
=
-
1
;
MessageBoxW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_SEARCH_FINISHED
),
wszAppTitle
,
MessageBoxW
ithResStringW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_SEARCH_FINISHED
),
wszAppTitle
,
MB_OK
|
MB_ICONASTERISK
);
}
else
{
...
...
@@ -1503,7 +1522,7 @@ static INT_PTR CALLBACK paraformat_proc(HWND hWnd, UINT message, WPARAM wParam,
if
(
ret
!=
3
)
{
MessageBoxW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_INVALID_NUMBER
),
MessageBoxW
ithResStringW
(
hMainWnd
,
MAKEINTRESOURCEW
(
STRING_INVALID_NUMBER
),
wszAppTitle
,
MB_OK
|
MB_ICONASTERISK
);
return
FALSE
;
}
else
...
...
@@ -1615,7 +1634,7 @@ static INT_PTR CALLBACK tabstops_proc(HWND hWnd, UINT message, WPARAM wParam, LP
if
(
!
number_from_string
(
buffer
,
&
number
,
TRUE
))
{
MessageBoxW
(
hWnd
,
MAKEINTRESOURCEW
(
STRING_INVALID_NUMBER
),
MessageBoxW
ithResStringW
(
hWnd
,
MAKEINTRESOURCEW
(
STRING_INVALID_NUMBER
),
wszAppTitle
,
MB_OK
|
MB_ICONINFORMATION
);
}
else
{
...
...
@@ -1817,7 +1836,7 @@ static LRESULT OnCreate( HWND hWnd )
hDLL
=
LoadLibraryW
(
wszRichEditDll
);
if
(
!
hDLL
)
{
MessageBoxW
(
hWnd
,
MAKEINTRESOURCEW
(
STRING_LOAD_RICHED_FAILED
),
wszAppTitle
,
MessageBoxW
ithResStringW
(
hWnd
,
MAKEINTRESOURCEW
(
STRING_LOAD_RICHED_FAILED
),
wszAppTitle
,
MB_OK
|
MB_ICONEXCLAMATION
);
PostQuitMessage
(
1
);
}
...
...
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