define UNICODE when including windows
This commit is contained in:
parent
8035e3d4bd
commit
d29b0569ee
@ -12,6 +12,7 @@
|
||||
#include "tls.h"
|
||||
#include "utf.h"
|
||||
|
||||
#define UNICODE
|
||||
#include <Windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <ShlObj_core.h>
|
||||
@ -930,8 +931,6 @@ INTERNAL LRESULT CALLBACK win32_window_proc(HWND hwnd, UINT msg, WPARAM wparam,
|
||||
struct utf16_decode_result decoded = utf16_decode((struct string16) { .len = ARRAY_COUNT(utf16_pair_bytes), .text = utf16_pair_bytes });
|
||||
if (decoded.advance16 == 2 && decoded.codepoint < U32_MAX) {
|
||||
codepoint = decoded.codepoint;
|
||||
} else {
|
||||
codepoint = '?';
|
||||
}
|
||||
}
|
||||
window->utf16_high_surrogate_last_input = 0;
|
||||
@ -1923,9 +1922,9 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
|
||||
wc->hInstance = instance;
|
||||
|
||||
/* Use first icon resource as window icon (same as explorer) */
|
||||
char path[MAX_PATH] = { 0 };
|
||||
GetModuleFileName(instance, path, MAX_PATH);
|
||||
ExtractIconEx(path, 0, &wc->hIcon, &wc->hIconSm, 1);
|
||||
wchar_t path[MAX_PATH] = { 0 };
|
||||
GetModuleFileNameW(instance, path, MAX_PATH);
|
||||
ExtractIconExW(path, 0, &wc->hIcon, &wc->hIconSm, 1);
|
||||
|
||||
if (!RegisterClassExW(wc)) {
|
||||
/* TODO: GetLastError */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user