mirror of
https://github.com/ocornut/imgui.git
synced 2025-09-08 12:28:24 +00:00
This commit is contained in:
@@ -1062,8 +1062,8 @@ static void ImGui_ImplWin32_CreateWindow(ImGuiViewport* viewport)
|
|||||||
// Create window
|
// Create window
|
||||||
RECT rect = { (LONG)viewport->Pos.x, (LONG)viewport->Pos.y, (LONG)(viewport->Pos.x + viewport->Size.x), (LONG)(viewport->Pos.y + viewport->Size.y) };
|
RECT rect = { (LONG)viewport->Pos.x, (LONG)viewport->Pos.y, (LONG)(viewport->Pos.x + viewport->Size.x), (LONG)(viewport->Pos.y + viewport->Size.y) };
|
||||||
::AdjustWindowRectEx(&rect, vd->DwStyle, FALSE, vd->DwExStyle);
|
::AdjustWindowRectEx(&rect, vd->DwStyle, FALSE, vd->DwExStyle);
|
||||||
vd->Hwnd = ::CreateWindowEx(
|
vd->Hwnd = ::CreateWindowExW(
|
||||||
vd->DwExStyle, _T("ImGui Platform"), _T("Untitled"), vd->DwStyle, // Style, class name, window name
|
vd->DwExStyle, L"ImGui Platform", L"Untitled", vd->DwStyle, // Style, class name, window name
|
||||||
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, // Window area
|
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, // Window area
|
||||||
vd->HwndParent, nullptr, ::GetModuleHandle(nullptr), nullptr); // Owner window, Menu, Instance, Param
|
vd->HwndParent, nullptr, ::GetModuleHandle(nullptr), nullptr); // Owner window, Menu, Instance, Param
|
||||||
vd->HwndOwned = true;
|
vd->HwndOwned = true;
|
||||||
@@ -1330,8 +1330,8 @@ static LRESULT CALLBACK ImGui_ImplWin32_WndProcHandler_PlatformWindow(HWND hWnd,
|
|||||||
|
|
||||||
static void ImGui_ImplWin32_InitPlatformInterface(bool platform_has_own_dc)
|
static void ImGui_ImplWin32_InitPlatformInterface(bool platform_has_own_dc)
|
||||||
{
|
{
|
||||||
WNDCLASSEX wcex;
|
WNDCLASSEXW wcex;
|
||||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
wcex.cbSize = sizeof(WNDCLASSEXW);
|
||||||
wcex.style = CS_HREDRAW | CS_VREDRAW | (platform_has_own_dc ? CS_OWNDC : 0);
|
wcex.style = CS_HREDRAW | CS_VREDRAW | (platform_has_own_dc ? CS_OWNDC : 0);
|
||||||
wcex.lpfnWndProc = ImGui_ImplWin32_WndProcHandler_PlatformWindow;
|
wcex.lpfnWndProc = ImGui_ImplWin32_WndProcHandler_PlatformWindow;
|
||||||
wcex.cbClsExtra = 0;
|
wcex.cbClsExtra = 0;
|
||||||
@@ -1341,9 +1341,9 @@ static void ImGui_ImplWin32_InitPlatformInterface(bool platform_has_own_dc)
|
|||||||
wcex.hCursor = nullptr;
|
wcex.hCursor = nullptr;
|
||||||
wcex.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
|
wcex.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
|
||||||
wcex.lpszMenuName = nullptr;
|
wcex.lpszMenuName = nullptr;
|
||||||
wcex.lpszClassName = _T("ImGui Platform");
|
wcex.lpszClassName = L"ImGui Platform";
|
||||||
wcex.hIconSm = nullptr;
|
wcex.hIconSm = nullptr;
|
||||||
::RegisterClassEx(&wcex);
|
::RegisterClassExW(&wcex);
|
||||||
|
|
||||||
ImGui_ImplWin32_UpdateMonitors();
|
ImGui_ImplWin32_UpdateMonitors();
|
||||||
|
|
||||||
|
@@ -84,6 +84,9 @@ Other changes:
|
|||||||
Docking+Viewports Branch:
|
Docking+Viewports Branch:
|
||||||
|
|
||||||
- Backends: SDL2, SDL3: Fixed building for UWP platforms. (#8008)
|
- Backends: SDL2, SDL3: Fixed building for UWP platforms. (#8008)
|
||||||
|
- Backends: Win32: Use ResisterClassW()/CreateWindowExW() for secondary viewports, to
|
||||||
|
ensure correct IME input even if the backend was compiled in MBCS mode. (#7979, #5725)
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
VERSION 1.91.2 (Released 2024-09-19)
|
VERSION 1.91.2 (Released 2024-09-19)
|
||||||
|
Reference in New Issue
Block a user