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