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
4be4b19e
Commit
4be4b19e
authored
Jan 06, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Convert error box display to Unicode.
parent
259e8f61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
edit.c
programs/regedit/edit.c
+10
-12
framewnd.c
programs/regedit/framewnd.c
+1
-3
No files found.
programs/regedit/edit.c
View file @
4be4b19e
...
...
@@ -49,19 +49,19 @@ struct edit_params
static
INT
vmessagebox
(
HWND
hwnd
,
INT
buttons
,
INT
titleId
,
INT
resId
,
va_list
ap
)
{
TCHAR
title
[
256
];
TCHAR
errfmt
[
1024
];
TCHAR
errstr
[
1024
];
static
const
WCHAR
errorW
[]
=
{
'E'
,
'r'
,
'r'
,
'o'
,
'r'
,
0
};
static
const
WCHAR
unknownW
[]
=
{
'U'
,
'n'
,
'k'
,
'n'
,
'o'
,
'w'
,
'n'
,
' '
,
'e'
,
'r'
,
'r'
,
'o'
,
'r'
,
' '
,
's'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'!'
,
0
};
if
(
!
LoadString
(
hInst
,
titleId
,
title
,
COUNT_OF
(
title
)))
lstrcpy
(
title
,
"Error"
);
WCHAR
title
[
256
];
WCHAR
errfmt
[
1024
];
WCHAR
errstr
[
1024
];
if
(
!
LoadString
(
hInst
,
resId
,
errfmt
,
COUNT_OF
(
errfmt
)))
lstrcpy
(
errfmt
,
"Unknown error string!"
);
if
(
!
LoadString
W
(
hInst
,
titleId
,
title
,
COUNT_OF
(
title
)))
lstrcpyW
(
title
,
errorW
);
if
(
!
LoadStringW
(
hInst
,
resId
,
errfmt
,
COUNT_OF
(
errfmt
)))
lstrcpyW
(
errfmt
,
unknownW
);
_vsntprintf
(
errstr
,
COUNT_OF
(
errstr
),
errfmt
,
ap
);
vsnprintfW
(
errstr
,
COUNT_OF
(
errstr
),
errfmt
,
ap
);
return
MessageBox
(
hwnd
,
errstr
,
title
,
buttons
);
return
MessageBox
W
(
hwnd
,
errstr
,
title
,
buttons
);
}
static
INT
messagebox
(
HWND
hwnd
,
INT
buttons
,
INT
titleId
,
INT
resId
,
...)
...
...
@@ -401,7 +401,6 @@ BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
BOOL
result
=
FALSE
;
LONG
lRet
;
HKEY
hKey
;
CHAR
*
keyPathA
=
GetMultiByteString
(
keyPath
);
lRet
=
RegOpenKeyExW
(
hKeyRoot
,
keyPath
,
0
,
KEY_READ
|
KEY_SET_VALUE
,
&
hKey
);
if
(
lRet
!=
ERROR_SUCCESS
)
{
...
...
@@ -409,7 +408,7 @@ BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
return
FALSE
;
}
if
(
messagebox
(
hwnd
,
MB_YESNO
|
MB_ICONEXCLAMATION
,
IDS_DELETE_BOX_TITLE
,
IDS_DELETE_BOX_TEXT
,
keyPath
A
)
!=
IDYES
)
if
(
messagebox
(
hwnd
,
MB_YESNO
|
MB_ICONEXCLAMATION
,
IDS_DELETE_BOX_TITLE
,
IDS_DELETE_BOX_TEXT
,
keyPath
)
!=
IDYES
)
goto
done
;
lRet
=
SHDeleteKeyW
(
hKeyRoot
,
keyPath
);
...
...
@@ -421,7 +420,6 @@ BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
done:
RegCloseKey
(
hKey
);
HeapFree
(
GetProcessHeap
(),
0
,
keyPathA
);
return
result
;
}
...
...
programs/regedit/framewnd.c
View file @
4be4b19e
...
...
@@ -757,9 +757,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
SetFocus
(
g_pChildWnd
->
hTreeWnd
);
}
}
else
{
CHAR
*
searchStringA
=
GetMultiByteString
(
searchString
);
error
(
hWnd
,
IDS_NOTFOUND
,
searchStringA
);
HeapFree
(
GetProcessHeap
(),
0
,
searchStringA
);
error
(
hWnd
,
IDS_NOTFOUND
,
searchString
);
}
}
break
;
...
...
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