(w32_window_app): Init common controls when windowed.
authorJason Rumney <jasonr@gnu.org>
Thu, 27 Sep 2007 22:08:59 +0000 (22:08 +0000)
committerJason Rumney <jasonr@gnu.org>
Thu, 27 Sep 2007 22:08:59 +0000 (22:08 +0000)
lib-src/ChangeLog
lib-src/emacsclient.c

index fca9e1c..a09ba2c 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-27  Jason Rumney  <jasonr@gnu.org>
+
+       * makefile.w32-in (emacsclient, emacsclientw): Link to COMCTL32.
+
+       * emacsclient.c (w32_window_app): Init common controls when windowed.
+
 2007-08-25  Eli Zaretskii  <eliz@gnu.org>
 
        * Makefile.in (rcs2log, rcs-checkin, grep-changelog, vcdiff):
index 9edba13..c7f0bcf 100644 (file)
@@ -35,6 +35,7 @@ Boston, MA 02110-1301, USA.  */
 # include <malloc.h>
 # include <stdlib.h>
 # include <windows.h>
+# include <commctrl.h>
 
 # define NO_SOCKETS_IN_FILE_SYSTEM
 
@@ -159,9 +160,13 @@ w32_window_app ()
   char szTitle[MAX_PATH];
 
   if (window_app < 0)
-    /* Checking for STDOUT does not work; it's a valid handle also in
-       nonconsole apps.  Testing for the console title seems to work. */
-    window_app = (GetConsoleTitleA (szTitle, MAX_PATH) == 0);
+    {
+      /* Checking for STDOUT does not work; it's a valid handle also in
+         nonconsole apps.  Testing for the console title seems to work. */
+      window_app = (GetConsoleTitleA (szTitle, MAX_PATH) == 0);
+      if (window_app)
+        InitCommonControls();
+    }
 
   return window_app;
 }