https://git.reactos.org/?p=reactos.git;a=commitdiff;h=02312c7bf1f0af1bbb4da…
commit 02312c7bf1f0af1bbb4da9d0098d6c3c995977a0
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Dec 8 11:01:00 2023 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Fri Dec 8 11:01:00 2023 +0900
[SHIMGVW] Main window class must be "ShImgVw:CPreviewWnd"
and window style is (WS_VISIBLE | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW).
CORE-19358
---
dll/win32/shimgvw/shimgvw.c | 8 ++++----
dll/win32/shimgvw/shimgvw.h | 2 ++
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dll/win32/shimgvw/shimgvw.c b/dll/win32/shimgvw/shimgvw.c
index cb167561af2..0a84f3e5208 100644
--- a/dll/win32/shimgvw/shimgvw.c
+++ b/dll/win32/shimgvw/shimgvw.c
@@ -1200,19 +1200,19 @@ ImageView_CreateWindow(HWND hwnd, LPCWSTR szFileName)
pLoadImage(szFileName);
// Create the window
- WndClass.lpszClassName = L"shimgvw_window";
+ WndClass.lpszClassName = WC_SHIMGVW;
WndClass.lpfnWndProc = ImageView_WndProc;
WndClass.hInstance = hInstance;
WndClass.style = CS_HREDRAW | CS_VREDRAW;
WndClass.hIcon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_APP_ICON));
- WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
+ WndClass.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW);
WndClass.hbrBackground = NULL; /* less flicker */
if (!RegisterClassW(&WndClass)) return -1;
LoadStringW(hInstance, IDS_APPTITLE, szBuf, _countof(szBuf));
- hMainWnd = CreateWindowExW(0, L"shimgvw_window", szBuf,
- WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CAPTION,
+ hMainWnd = CreateWindowExW(WS_EX_WINDOWEDGE, WC_SHIMGVW, szBuf,
+ WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS,
CW_USEDEFAULT, CW_USEDEFAULT,
0, 0, NULL, NULL, hInstance, NULL);
diff --git a/dll/win32/shimgvw/shimgvw.h b/dll/win32/shimgvw/shimgvw.h
index 9bce39c6cbf..4f89213a445 100644
--- a/dll/win32/shimgvw/shimgvw.h
+++ b/dll/win32/shimgvw/shimgvw.h
@@ -20,3 +20,5 @@ typedef struct SHIMGVW_FILENODE_INTERNAL
struct SHIMGVW_FILENODE_INTERNAL *Prev;
struct SHIMGVW_FILENODE_INTERNAL *Next;
} SHIMGVW_FILENODE;
+
+#define WC_SHIMGVW L"ShImgVw:CPreviewWnd"