diff src/device-msw.c @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents da8ed4261e83
children
line wrap: on
line diff
--- a/src/device-msw.c	Mon Aug 13 11:25:03 2007 +0200
+++ b/src/device-msw.c	Mon Aug 13 11:26:11 2007 +0200
@@ -139,7 +139,9 @@
   wc.lpfnWndProc = (WNDPROC) mswindows_wnd_proc;
   wc.cbClsExtra = 0;
   wc.cbWndExtra = MSWINDOWS_WINDOW_EXTRA_BYTES;
-  wc.hInstance = NULL;	/* ? */
+  /* This must match whatever is passed to CreateWIndowEx, NULL is ok
+     for this. */
+  wc.hInstance = NULL;	
   wc.hIcon = LoadIcon (GetModuleHandle(NULL), XEMACS_CLASS);
   wc.hCursor = LoadCursor (NULL, IDC_ARROW);
   /* Background brush is only used during sizing, when XEmacs cannot
@@ -151,6 +153,17 @@
   wc.hIconSm = LoadImage (GetModuleHandle (NULL), XEMACS_CLASS,
 			  IMAGE_ICON, 16, 16, 0);
   RegisterClassEx (&wc);
+
+#ifdef HAVE_WIDGETS
+  xzero (wc);
+  /* Register the main window class */
+  wc.cbSize = sizeof (WNDCLASSEX);
+  wc.lpfnWndProc = (WNDPROC) mswindows_control_wnd_proc;
+  wc.lpszClassName = XEMACS_CONTROL_CLASS;
+  wc.hInstance = NULL;
+  RegisterClassEx (&wc);
+#endif
+
 #ifdef HAVE_TOOLBARS
   InitCommonControls ();
 #endif