mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[UXTHEME] DrawNCPreview: Do not draw the icon for inactive/active windows
This is how preview works in Windows. Addendum to 118869f69. CORE-5991
This commit is contained in:
@@ -1239,7 +1239,7 @@ HRESULT WINAPI DrawNCPreview(HDC hDC,
|
||||
if (!RegisterClassExW(&DummyPreviewWindowClass))
|
||||
return E_FAIL;
|
||||
|
||||
hwndDummy = CreateWindowExW(0, L"DummyPreviewWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VSCROLL, 30, 30, 300, 150, 0, 0, hDllInst, NULL);
|
||||
hwndDummy = CreateWindowExW(WS_EX_DLGMODALFRAME, L"DummyPreviewWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VSCROLL, 30, 30, 300, 150, 0, 0, hDllInst, NULL);
|
||||
if (!hwndDummy)
|
||||
return E_FAIL;
|
||||
|
||||
@@ -1295,14 +1295,11 @@ HRESULT WINAPI DrawNCPreview(HDC hDC,
|
||||
SetWindowResourceText(hwndDummy, IDS_MESSAGEBOX);
|
||||
DWORD dwStyleNew = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_DLGFRAME;
|
||||
SetWindowLongPtr(hwndDummy, GWL_STYLE, dwStyleNew);
|
||||
DWORD dwExStyleNew = WS_EX_DLGMODALFRAME;
|
||||
SetWindowLongPtr(hwndDummy, GWL_EXSTYLE, dwExStyleNew);
|
||||
|
||||
if (!GetWindowInfo(hwndDummy, &context.wi))
|
||||
return E_FAIL;
|
||||
|
||||
context.wi.dwStyle = WS_VISIBLE | dwStyleNew;
|
||||
context.wi.dwExStyle = dwExStyleNew;
|
||||
|
||||
INT msgBoxHCenter = rcAdjPreview.left + (previewWidth / 2);
|
||||
INT msgBoxVCenter = rcAdjPreview.top + (previewHeight / 2);
|
||||
|
||||
Reference in New Issue
Block a user