Refine new editor shell host and embedded icons

This commit is contained in:
2026-04-14 14:41:45 +08:00
parent 4ee1bcc599
commit 91c62c6b14
27 changed files with 768 additions and 124 deletions

View File

@@ -4,6 +4,13 @@
namespace XCEngine::UI::Editor::Host {
namespace {
constexpr UINT kMessageNcUaDrawCaption = 0x00AEu;
constexpr UINT kMessageNcUaDrawFrame = 0x00AFu;
} // namespace
void TryEnableNonClientDpiScaling(HWND hwnd) {
if (hwnd == nullptr) {
return;
@@ -82,6 +89,20 @@ bool WindowMessageDispatcher::TryDispatch(
return true;
}
return false;
case WM_NCHITTEST:
if (application.IsBorderlessWindowEnabled()) {
outResult = HTCLIENT;
return true;
}
return false;
case WM_NCPAINT:
case kMessageNcUaDrawCaption:
case kMessageNcUaDrawFrame:
if (application.IsBorderlessWindowEnabled()) {
outResult = 0;
return true;
}
return false;
case WM_SYSCOMMAND:
if (application.HandleBorderlessWindowSystemCommand(wParam)) {
outResult = 0;