Refine new editor shell host and embedded icons
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user