Fix window title (everything use unicode)

This commit is contained in:
2025-02-19 22:12:02 -05:00
parent 8326772558
commit f83a238473
2 changed files with 6 additions and 6 deletions

View File

@@ -155,7 +155,7 @@ namespace Juliet::Win32
auto* windowState = GetWindowStateFromHandle(handle);
if (!windowState)
{
return CallWindowProcA(DefWindowProcA, handle, message, wParam, lParam);
return CallWindowProc(DefWindowProc, handle, message, wParam, lParam);
}
switch (message)
@@ -267,6 +267,6 @@ namespace Juliet::Win32
return returnCode;
}
return CallWindowProcA(DefWindowProcA, handle, message, wParam, lParam);
return CallWindowProc(DefWindowProc, handle, message, wParam, lParam);
}
} // namespace Juliet::Win32

View File

@@ -9,7 +9,7 @@ namespace Juliet::Win32
{
namespace
{
constexpr auto WindowClassName = L"JulietWindowClass";
constexpr auto WindowClassName = L"JulietWindowClass";
constexpr LPCWSTR WindowClassPtr = WindowClassName;
bool SetupWindowState(NonNullPtr<DisplayDevice> self, NonNullPtr<Window> window, HWND handle)
@@ -43,10 +43,10 @@ namespace Juliet::Win32
bool CreatePlatformWindow(NonNullPtr<DisplayDevice> self, NonNullPtr<Window> window)
{
// TODO : save the instance in app state or something
HINSTANCE instance = GetModuleHandle(NULL);
HINSTANCE instance = GetModuleHandle(nullptr);
// TODO : Put outside, we should not create a new class for each new window
WNDCLASSEX WindowClass = {};
WNDCLASSEX WindowClass = {};
WindowClass.cbSize = sizeof(WNDCLASSEX);
WindowClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
WindowClass.lpfnWndProc = Win32MainWindowCallback;
@@ -65,7 +65,7 @@ namespace Juliet::Win32
int x = CW_USEDEFAULT, y = CW_USEDEFAULT;
const int w = window->Width, h = window->Height;
HWND handle = CreateWindowEx(styleEx, WindowClassPtr, L"JULIET TODO PASS TITLE", style, x, y, w, h, nullptr,
nullptr, instance, nullptr);
nullptr, instance, nullptr);
PumpEvents(self);