Zhiyi Zhang : notepad: Enable visual styles.

Alexandre Julliard julliard at winehq.org
Thu Jun 10 16:04:52 CDT 2021


Module: wine
Branch: master
Commit: 026a6ff2be47427db319881cfca52993874c4223
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=026a6ff2be47427db319881cfca52993874c4223

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Thu Jun 10 11:03:35 2021 +0800

notepad: Enable visual styles.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/notepad/Makefile.in      |  2 +-
 programs/notepad/main.c           |  3 +++
 programs/notepad/notepad.manifest | 16 ++++++++++++++++
 programs/notepad/notepad.rc       |  3 +++
 4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/programs/notepad/Makefile.in b/programs/notepad/Makefile.in
index 06c5ff04c1e..ba32100c40f 100644
--- a/programs/notepad/Makefile.in
+++ b/programs/notepad/Makefile.in
@@ -1,5 +1,5 @@
 MODULE    = notepad.exe
-IMPORTS   = comdlg32 shell32 shlwapi user32 gdi32 advapi32
+IMPORTS   = comdlg32 shell32 shlwapi user32 gdi32 advapi32 comctl32
 
 EXTRADLLFLAGS = -mwindows -mno-cygwin
 
diff --git a/programs/notepad/main.c b/programs/notepad/main.c
index 3f046f19d19..210ecd2bfc8 100644
--- a/programs/notepad/main.c
+++ b/programs/notepad/main.c
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include <windows.h>
+#include <commctrl.h>
 #include <commdlg.h>
 #include <shellapi.h>
 #include <shlwapi.h>
@@ -750,6 +751,8 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
     static const WCHAR className[] = {'N','o','t','e','p','a','d',0};
     static const WCHAR winName[]   = {'N','o','t','e','p','a','d',0};
 
+    InitCommonControls();
+
     aFINDMSGSTRING = RegisterWindowMessageW(FINDMSGSTRINGW);
 
     ZeroMemory(&Globals, sizeof(Globals));
diff --git a/programs/notepad/notepad.manifest b/programs/notepad/notepad.manifest
new file mode 100644
index 00000000000..30aa0f3853b
--- /dev/null
+++ b/programs/notepad/notepad.manifest
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity type="win32" name="Wine.Notepad" version="0.0.0.0"/>
+<dependency>
+    <dependentAssembly>
+        <assemblyIdentity
+            type="win32"
+            name="Microsoft.Windows.Common-Controls"
+            version="6.0.0.0"
+            processorArchitecture="*"
+            publicKeyToken="6595b64144ccf1df"
+            language="*"
+        />
+    </dependentAssembly>
+</dependency>
+</assembly>
diff --git a/programs/notepad/notepad.rc b/programs/notepad/notepad.rc
index 63b8c7d91b8..6fc12dcf5cd 100644
--- a/programs/notepad/notepad.rc
+++ b/programs/notepad/notepad.rc
@@ -149,5 +149,8 @@ ID_ACCEL ACCELERATORS
 
 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 
+/* @makedep: notepad.manifest */
+1 RT_MANIFEST notepad.manifest
+
 /* @makedep: notepad.ico */
 IDI_NOTEPAD ICON "notepad.ico"




More information about the wine-cvs mailing list