Skip to content

Commit

Permalink
Examples: Win32: Fixed examples using RegisterClassW() since 1.89 to …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
markreidvfx authored and ocornut committed Jan 24, 2023
1 parent 3d8885c commit fe0a24f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/CHANGELOG.txt
Expand Up @@ -51,6 +51,9 @@ All changes:
- PlotHistogram, PlotLines: Passing negative sizes honor alignment like other widgets.
- ImDrawList: Added missing early-out in AddPolyline() and AddConvexPolyFilled() when
color alpha is zero.
- Examples: Win32: Fixed examples using RegisterClassW() since 1.89 to also call
DefWindowProcW() instead of DefWindowProc() so that title text are correctly converted
when application is compiled without /DUNICODE. (#5725, #5961, #5975) [@markreidvfx]


-----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/example_win32_directx10/main.cpp
Expand Up @@ -243,5 +243,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
::PostQuitMessage(0);
return 0;
}
return ::DefWindowProc(hWnd, msg, wParam, lParam);
return ::DefWindowProcW(hWnd, msg, wParam, lParam);
}
2 changes: 1 addition & 1 deletion examples/example_win32_directx11/main.cpp
Expand Up @@ -247,5 +247,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
::PostQuitMessage(0);
return 0;
}
return ::DefWindowProc(hWnd, msg, wParam, lParam);
return ::DefWindowProcW(hWnd, msg, wParam, lParam);
}
2 changes: 1 addition & 1 deletion examples/example_win32_directx12/main.cpp
Expand Up @@ -462,5 +462,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
::PostQuitMessage(0);
return 0;
}
return ::DefWindowProc(hWnd, msg, wParam, lParam);
return ::DefWindowProcW(hWnd, msg, wParam, lParam);
}
2 changes: 1 addition & 1 deletion examples/example_win32_directx9/main.cpp
Expand Up @@ -234,5 +234,5 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
::PostQuitMessage(0);
return 0;
}
return ::DefWindowProc(hWnd, msg, wParam, lParam);
return ::DefWindowProcW(hWnd, msg, wParam, lParam);
}

0 comments on commit fe0a24f

Please sign in to comment.