Win32: mark all remaining functions as Unicode. NFC.

Some were missing the *W suffix.
pull/528/head
whitequark 2019-12-06 15:21:51 +00:00
parent 69baf52432
commit 64c0f62b92
1 changed files with 16 additions and 16 deletions

View File

@ -73,7 +73,7 @@ namespace Platform {
void CheckLastError(const char *file, int line, const char *function, const char *expr) {
if(GetLastError() != S_OK) {
LPWSTR messageW;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR)&messageW, 0, NULL);
@ -203,7 +203,7 @@ public:
uint32_t ThawInt(const std::string &key, uint32_t defaultValue) {
DWORD value;
DWORD type, length = sizeof(value);
LSTATUS result = RegQueryValueEx(GetKey(), &Widen(key)[0], 0,
LSTATUS result = RegQueryValueExW(GetKey(), &Widen(key)[0], 0,
&type, (BYTE *)&value, &length);
if(result == ERROR_SUCCESS && type == REG_DWORD) {
return value;
@ -219,7 +219,7 @@ public:
double ThawFloat(const std::string &key, double defaultValue) {
double value;
DWORD type, length = sizeof(value);
LSTATUS result = RegQueryValueEx(GetKey(), &Widen(key)[0], 0,
LSTATUS result = RegQueryValueExW(GetKey(), &Widen(key)[0], 0,
&type, (BYTE *)&value, &length);
if(result == ERROR_SUCCESS && type == REG_QWORD) {
return value;
@ -237,12 +237,12 @@ public:
std::string ThawString(const std::string &key, const std::string &defaultValue) {
DWORD type, length = 0;
LSTATUS result = RegQueryValueEx(GetKey(), &Widen(key)[0], 0,
LSTATUS result = RegQueryValueExW(GetKey(), &Widen(key)[0], 0,
&type, NULL, &length);
if(result == ERROR_SUCCESS && type == REG_SZ) {
std::wstring valueW;
valueW.resize(length / 2 - 1);
sscheck(RegQueryValueEx(GetKey(), &Widen(key)[0], 0,
sscheck(RegQueryValueExW(GetKey(), &Widen(key)[0], 0,
&type, (BYTE *)&valueW[0], &length));
return Narrow(valueW);
}
@ -538,7 +538,7 @@ public:
static bool registered;
if(registered) return;
WNDCLASSEX wc = {};
WNDCLASSEXW wc = {};
wc.cbSize = sizeof(wc);
wc.style = CS_BYTEALIGNCLIENT|CS_BYTEALIGNWINDOW|CS_OWNDC|CS_DBLCLKS;
wc.lpfnWndProc = WndProc;
@ -549,7 +549,7 @@ public:
IMAGE_ICON, 16, 16, 0);
wc.hCursor = LoadCursorW(NULL, IDC_ARROW);
wc.lpszClassName = L"SolveSpace";
sscheck(RegisterClassEx(&wc));
sscheck(RegisterClassExW(&wc));
registered = true;
}
@ -702,7 +702,7 @@ public:
// The wndproc may be called from within CreateWindowEx, and before we've associated
// the window with the WindowImplWin32. In that case, just defer to the default wndproc.
if(window == NULL) {
return DefWindowProc(h, msg, wParam, lParam);
return DefWindowProcW(h, msg, wParam, lParam);
}
#if defined(HAVE_SPACEWARE)
@ -999,7 +999,7 @@ public:
sscheck(SetForegroundWindow(hParent));
break;
} else {
return DefWindowProc(h, msg, wParam, lParam);
return DefWindowProcW(h, msg, wParam, lParam);
}
}
@ -1042,7 +1042,7 @@ public:
}
default:
return DefWindowProc(h, msg, wParam, lParam);
return DefWindowProcW(h, msg, wParam, lParam);
}
return 0;