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