Karsten Hopp a81c14
To: vim-dev@vim.org
Karsten Hopp a81c14
Subject: Patch 7.2.362 (extra)
Karsten Hopp a81c14
Fcc: outbox
Karsten Hopp a81c14
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp a81c14
Mime-Version: 1.0
Karsten Hopp a81c14
Content-Type: text/plain; charset=UTF-8
Karsten Hopp a81c14
Content-Transfer-Encoding: 8bit
Karsten Hopp a81c14
------------
Karsten Hopp a81c14
Karsten Hopp a81c14
Patch 7.2.362 (extra, after 7.2.352)
Karsten Hopp a81c14
Problem:    Win64: Vim doesn't work when cross-compiled with MingW libraries.
Karsten Hopp a81c14
Solution:   Instead of handling WM_NCCREATE, create wide text area window
Karsten Hopp a81c14
            class if the parent window iw side. (Sergey Khorev)
Karsten Hopp a81c14
Files:      src/gui_w32.c, src/gui_w48.c
Karsten Hopp a81c14
Karsten Hopp a81c14
Karsten Hopp a81c14
*** ../vim-7.2.361/src/gui_w32.c	2009-12-24 16:11:24.000000000 +0100
Karsten Hopp a81c14
--- src/gui_w32.c	2010-02-17 16:26:58.000000000 +0100
Karsten Hopp a81c14
***************
Karsten Hopp a81c14
*** 1329,1334 ****
Karsten Hopp a81c14
--- 1329,1335 ----
Karsten Hopp a81c14
      WNDCLASS wndclass;
Karsten Hopp a81c14
  #ifdef FEAT_MBYTE
Karsten Hopp a81c14
      const WCHAR szVimWndClassW[] = VIM_CLASSW;
Karsten Hopp a81c14
+     const WCHAR szTextAreaClassW[] = L"VimTextArea";
Karsten Hopp a81c14
      WNDCLASSW wndclassw;
Karsten Hopp a81c14
  #endif
Karsten Hopp a81c14
  #ifdef GLOBAL_IME
Karsten Hopp a81c14
***************
Karsten Hopp a81c14
*** 1479,1484 ****
Karsten Hopp a81c14
--- 1480,1507 ----
Karsten Hopp a81c14
  #endif
Karsten Hopp a81c14
  
Karsten Hopp a81c14
      /* Create the text area window */
Karsten Hopp a81c14
+ #ifdef FEAT_MBYTE
Karsten Hopp a81c14
+     if (wide_WindowProc)
Karsten Hopp a81c14
+     {
Karsten Hopp a81c14
+ 	if (GetClassInfoW(s_hinst, szTextAreaClassW, &wndclassw) == 0)
Karsten Hopp a81c14
+ 	{
Karsten Hopp a81c14
+ 	    wndclassw.style = CS_OWNDC;
Karsten Hopp a81c14
+ 	    wndclassw.lpfnWndProc = _TextAreaWndProc;
Karsten Hopp a81c14
+ 	    wndclassw.cbClsExtra = 0;
Karsten Hopp a81c14
+ 	    wndclassw.cbWndExtra = 0;
Karsten Hopp a81c14
+ 	    wndclassw.hInstance = s_hinst;
Karsten Hopp a81c14
+ 	    wndclassw.hIcon = NULL;
Karsten Hopp a81c14
+ 	    wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW);
Karsten Hopp a81c14
+ 	    wndclassw.hbrBackground = NULL;
Karsten Hopp a81c14
+ 	    wndclassw.lpszMenuName = NULL;
Karsten Hopp a81c14
+ 	    wndclassw.lpszClassName = szTextAreaClassW;
Karsten Hopp a81c14
+ 
Karsten Hopp a81c14
+ 	    if (RegisterClassW(&wndclassw) == 0)
Karsten Hopp a81c14
+ 		return FAIL;
Karsten Hopp a81c14
+ 	}
Karsten Hopp a81c14
+     }
Karsten Hopp a81c14
+     else
Karsten Hopp a81c14
+ #endif
Karsten Hopp a81c14
      if (GetClassInfo(s_hinst, szTextAreaClass, &wndclass) == 0)
Karsten Hopp a81c14
      {
Karsten Hopp a81c14
  	wndclass.style = CS_OWNDC;
Karsten Hopp a81c14
*** ../vim-7.2.361/src/gui_w48.c	2010-02-03 12:23:16.000000000 +0100
Karsten Hopp a81c14
--- src/gui_w48.c	2010-02-17 16:27:21.000000000 +0100
Karsten Hopp a81c14
***************
Karsten Hopp a81c14
*** 1084,1096 ****
Karsten Hopp a81c14
  	case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam);
Karsten Hopp a81c14
  	    return TRUE;
Karsten Hopp a81c14
  #endif
Karsten Hopp a81c14
- 	/* Workaround for the problem that MyWindowProc() returns FALSE on 64
Karsten Hopp a81c14
- 	 * bit windows when cross-compiled using Mingw libraries. (Andy
Karsten Hopp a81c14
- 	 * Kittner) */
Karsten Hopp a81c14
- 	case WM_NCCREATE:
Karsten Hopp a81c14
- 	    MyWindowProc(hwnd, uMsg, wParam, lParam);
Karsten Hopp a81c14
- 	    return TRUE;
Karsten Hopp a81c14
- 
Karsten Hopp a81c14
  	default:
Karsten Hopp a81c14
  	    return MyWindowProc(hwnd, uMsg, wParam, lParam);
Karsten Hopp a81c14
      }
Karsten Hopp a81c14
--- 1084,1089 ----
Karsten Hopp a81c14
*** ../vim-7.2.361/src/version.c	2010-02-17 16:23:03.000000000 +0100
Karsten Hopp a81c14
--- src/version.c	2010-02-17 16:30:52.000000000 +0100
Karsten Hopp a81c14
***************
Karsten Hopp a81c14
*** 683,684 ****
Karsten Hopp a81c14
--- 683,686 ----
Karsten Hopp a81c14
  {   /* Add new patch number below this line */
Karsten Hopp a81c14
+ /**/
Karsten Hopp a81c14
+     362,
Karsten Hopp a81c14
  /**/
Karsten Hopp a81c14
Karsten Hopp a81c14
-- 
Karsten Hopp a81c14
"Marriage is the process of finding out what kind of man your wife
Karsten Hopp a81c14
would have preferred"
Karsten Hopp a81c14
Karsten Hopp a81c14
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp a81c14
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp a81c14
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp a81c14
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///