comparison src/gui_w32.c @ 1795:1fc8d918d9fc v7.2.093

updated for version 7.2-093
author vimboss
date Wed, 28 Jan 2009 20:23:17 +0000
parents a8aae2e1d2ae
children d3571ca62cd6
comparison
equal deleted inserted replaced
1794:54d5eb36689f 1795:1fc8d918d9fc
1580 s_findrep_struct.lpstrFindWhat[0] = NUL; 1580 s_findrep_struct.lpstrFindWhat[0] = NUL;
1581 s_findrep_struct.lpstrReplaceWith = alloc(MSWIN_FR_BUFSIZE); 1581 s_findrep_struct.lpstrReplaceWith = alloc(MSWIN_FR_BUFSIZE);
1582 s_findrep_struct.lpstrReplaceWith[0] = NUL; 1582 s_findrep_struct.lpstrReplaceWith[0] = NUL;
1583 s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE; 1583 s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE;
1584 s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE; 1584 s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE;
1585 # if defined(FEAT_MBYTE) && defined(WIN3264)
1586 s_findrep_struct_w.lStructSize = sizeof(s_findrep_struct_w);
1587 s_findrep_struct_w.lpstrFindWhat =
1588 (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
1589 s_findrep_struct_w.lpstrFindWhat[0] = NUL;
1590 s_findrep_struct_w.lpstrReplaceWith =
1591 (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
1592 s_findrep_struct_w.lpstrReplaceWith[0] = NUL;
1593 s_findrep_struct_w.wFindWhatLen = MSWIN_FR_BUFSIZE;
1594 s_findrep_struct_w.wReplaceWithLen = MSWIN_FR_BUFSIZE;
1595 # endif
1585 #endif 1596 #endif
1586 1597
1587 theend: 1598 theend:
1588 /* Display any pending error messages */ 1599 /* Display any pending error messages */
1589 display_errors(); 1600 display_errors();
2936 if (button >= DLG_NONBUTTON_CONTROL) 2947 if (button >= DLG_NONBUTTON_CONTROL)
2937 return TRUE; 2948 return TRUE;
2938 2949
2939 /* If the edit box exists, copy the string. */ 2950 /* If the edit box exists, copy the string. */
2940 if (s_textfield != NULL) 2951 if (s_textfield != NULL)
2941 GetDlgItemText(hwnd, DLG_NONBUTTON_CONTROL + 2, 2952 {
2953 # if defined(FEAT_MBYTE) && defined(WIN3264)
2954 /* If the OS is Windows NT, and 'encoding' differs from active
2955 * codepage: use wide function and convert text. */
2956 if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT
2957 && enc_codepage >= 0 && (int)GetACP() != enc_codepage)
2958 {
2959 WCHAR *wp = (WCHAR *)alloc(IOSIZE * sizeof(WCHAR));
2960 char_u *p;
2961
2962 GetDlgItemTextW(hwnd, DLG_NONBUTTON_CONTROL + 2, wp, IOSIZE);
2963 p = utf16_to_enc(wp, NULL);
2964 vim_strncpy(s_textfield, p, IOSIZE);
2965 vim_free(p);
2966 vim_free(wp);
2967 }
2968 else
2969 # endif
2970 GetDlgItemText(hwnd, DLG_NONBUTTON_CONTROL + 2,
2942 s_textfield, IOSIZE); 2971 s_textfield, IOSIZE);
2972 }
2943 2973
2944 /* 2974 /*
2945 * Need to check for IDOK because if the user just hits Return to 2975 * Need to check for IDOK because if the user just hits Return to
2946 * accept the default value, some reason this is what we get. 2976 * accept the default value, some reason this is what we get.
2947 */ 2977 */