Skip to content

Commit fe0a24f

Browse files
markreidvfxocornut
authored andcommitted
Examples: Win32: Fixed examples using RegisterClassW() since 1.89 to also call DefWindowProcW(). (#5725, #5961, #5975)
Fixes the window title from being truncated on calls to Platform_SetWindowTitle. Stops the WM_SETTEXT message that happens when calling setWindowTextW from being interpreted as ascii.
1 parent 3d8885c commit fe0a24f

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

docs/CHANGELOG.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ All changes:
5151
- PlotHistogram, PlotLines: Passing negative sizes honor alignment like other widgets.
5252
- ImDrawList: Added missing early-out in AddPolyline() and AddConvexPolyFilled() when
5353
color alpha is zero.
54+
- Examples: Win32: Fixed examples using RegisterClassW() since 1.89 to also call
55+
DefWindowProcW() instead of DefWindowProc() so that title text are correctly converted
56+
when application is compiled without /DUNICODE. (#5725, #5961, #5975) [@markreidvfx]
5457

5558

5659
-----------------------------------------------------------------------

examples/example_win32_directx10/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,5 +243,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
243243
::PostQuitMessage(0);
244244
return 0;
245245
}
246-
return ::DefWindowProc(hWnd, msg, wParam, lParam);
246+
return ::DefWindowProcW(hWnd, msg, wParam, lParam);
247247
}

examples/example_win32_directx11/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,5 +247,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
247247
::PostQuitMessage(0);
248248
return 0;
249249
}
250-
return ::DefWindowProc(hWnd, msg, wParam, lParam);
250+
return ::DefWindowProcW(hWnd, msg, wParam, lParam);
251251
}

examples/example_win32_directx12/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,5 +462,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
462462
::PostQuitMessage(0);
463463
return 0;
464464
}
465-
return ::DefWindowProc(hWnd, msg, wParam, lParam);
465+
return ::DefWindowProcW(hWnd, msg, wParam, lParam);
466466
}

examples/example_win32_directx9/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,5 +234,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
234234
::PostQuitMessage(0);
235235
return 0;
236236
}
237-
return ::DefWindowProc(hWnd, msg, wParam, lParam);
237+
return ::DefWindowProcW(hWnd, msg, wParam, lParam);
238238
}

0 commit comments

Comments
 (0)