diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-19 19:24:47 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-19 19:24:47 (GMT) |
commit | 4801848f58e2c408b9ec56a5d1db5625447da27c (patch) | |
tree | b5200858e09317656ab75d3759e7ceb166d562da /win/tkWinX.c | |
parent | 9483e2ad64759b1ee91a32ce91e1a9c89cb626f4 (diff) | |
download | tk-4801848f58e2c408b9ec56a5d1db5625447da27c.zip tk-4801848f58e2c408b9ec56a5d1db5625447da27c.tar.gz tk-4801848f58e2c408b9ec56a5d1db5625447da27c.tar.bz2 |
*A() to *W() Win32 API changes, actually the same because Tk is already compiled in UNICODE mode.
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r-- | win/tkWinX.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c index 2ea5a95..5617db9 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -69,7 +69,7 @@ static const char winScreenName[] = ":0"; /* Default name of windows display. */ static HINSTANCE tkInstance = NULL; /* Application instance handle. */ static int childClassInitialized; /* Registered child class? */ -static WNDCLASS childClass; /* Window class for child windows. */ +static WNDCLASSW childClass; /* Window class for child windows. */ static int tkPlatformId = 0; /* version of Windows platform */ static int tkWinTheme = 0; /* See TkWinGetPlatformTheme */ static Tcl_Encoding keyInputEncoding = NULL; @@ -138,7 +138,7 @@ TkGetServerInfo( OSVERSIONINFOW os; if (!buffer[0]) { - HANDLE handle = GetModuleHandle(L"NTDLL"); + HANDLE handle = GetModuleHandleW(L"NTDLL"); int(__stdcall *getversion)(void *) = (int(__stdcall *)(void *))GetProcAddress(handle, "RtlGetVersion"); os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); @@ -179,7 +179,7 @@ HINSTANCE Tk_GetHINSTANCE(void) { if (tkInstance == NULL) { - tkInstance = GetModuleHandle(NULL); + tkInstance = GetModuleHandleW(NULL); } return tkInstance; } @@ -259,7 +259,7 @@ TkWinXInit( childClass.hIcon = NULL; childClass.hCursor = NULL; - if (!RegisterClass(&childClass)) { + if (!RegisterClassW(&childClass)) { Tcl_Panic("Unable to register TkChild class"); } @@ -267,7 +267,7 @@ TkWinXInit( * Initialize input language info */ - if (GetLocaleInfo(LANGIDFROMLCID(PTR2INT(GetKeyboardLayout(0))), + if (GetLocaleInfoW(LANGIDFROMLCID(PTR2INT(GetKeyboardLayout(0))), LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, (LPWSTR) &lpCP, sizeof(lpCP)/sizeof(WCHAR)) && TranslateCharsetInfo(INT2PTR(lpCP), &lpCs, TCI_SRCCODEPAGE)) { @@ -309,7 +309,7 @@ TkWinXCleanup( if (childClassInitialized) { childClassInitialized = 0; - UnregisterClass(TK_WIN_CHILD_CLASS_NAME, hInstance); + UnregisterClassW(TK_WIN_CHILD_CLASS_NAME, hInstance); } if (unicodeEncoding != NULL) { @@ -371,11 +371,11 @@ TkWinGetPlatformId(void) char pBuffer[200]; memset(pBuffer, 0, dwSize); - if (RegOpenKeyEx(HKEY_CURRENT_USER, szSubKey, 0L, + if (RegOpenKeyExW(HKEY_CURRENT_USER, szSubKey, 0L, KEY_READ, &hKey) != ERROR_SUCCESS) { tkWinTheme = TK_THEME_WIN_XP; } else { - RegQueryValueEx(hKey, szCurrent, NULL, NULL, (LPBYTE) pBuffer, &dwSize); + RegQueryValueExW(hKey, szCurrent, NULL, NULL, (LPBYTE) pBuffer, &dwSize); RegCloseKey(hKey); if (strcmp(pBuffer, "Windows Standard") == 0) { tkWinTheme = TK_THEME_WIN_CLASSIC; |