diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2011-10-05 14:02:34 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2011-10-05 14:02:34 (GMT) |
commit | 3155150d888715de2f0d22c6b4963e161927110f (patch) | |
tree | 87a0d8f7cfc8a47cf6f10fe7581a019f7666210b /win/tkWinTest.c | |
parent | 8ad6f77878c1c486fc7e6c658a1c35308be29df6 (diff) | |
download | tk-3155150d888715de2f0d22c6b4963e161927110f.zip tk-3155150d888715de2f0d22c6b4963e161927110f.tar.gz tk-3155150d888715de2f0d22c6b4963e161927110f.tar.bz2 |
Remove tclWinProcs, as it is no longer being used
Diffstat (limited to 'win/tkWinTest.c')
-rw-r--r-- | win/tkWinTest.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/win/tkWinTest.c b/win/tkWinTest.c index f9cd350..d7d4d0f 100644 --- a/win/tkWinTest.c +++ b/win/tkWinTest.c @@ -40,24 +40,6 @@ static int TestwinlocaleObjCmd(ClientData clientData, Tcl_Obj *const objv[]); static Tk_GetSelProc SetSelectionResult; - -static const TkWinProcs unicodeProcs = { - 1, - (LRESULT (WINAPI *)(WNDPROC, HWND, UINT, WPARAM, LPARAM)) CallWindowProcW, - (LRESULT (WINAPI *)(HWND, UINT, WPARAM, LPARAM)) DefWindowProcW, - (ATOM (WINAPI *)(const WNDCLASS *)) RegisterClassW, - (BOOL (WINAPI *)(HWND, LPCTSTR)) SetWindowTextW, - (HWND (WINAPI *)(DWORD, LPCTSTR, LPCTSTR, DWORD, int, int, int, int, - HWND, HMENU, HINSTANCE, LPVOID)) CreateWindowExW, - (BOOL (WINAPI *)(HMENU, UINT, UINT, UINT, LPCTSTR)) InsertMenuW, - (int (WINAPI *)(HWND, LPCTSTR, int)) GetWindowTextW, - (HWND (WINAPI *)(LPCTSTR, LPCTSTR)) FindWindowW, - (int (WINAPI *)(HWND, LPTSTR, int)) GetClassNameW, -}; - -static const TkWinProcs *const tkTestWinProcs = &unicodeProcs; - - /* *---------------------------------------------------------------------- * @@ -128,7 +110,7 @@ AppendSystemError( if (Tcl_IsShared(resultPtr)) { resultPtr = Tcl_DuplicateObj(resultPtr); } - length = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM + length = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (WCHAR *) wMsgPtrPtr, @@ -417,7 +399,7 @@ TestfindwindowObjCmd( class = Tcl_WinUtfToTChar(Tcl_GetString(objv[2]), -1, &classString); } - hwnd = tkTestWinProcs->findWindow(class, title); + hwnd = FindWindow(class, title); if (hwnd == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to find window: ", -1)); @@ -465,7 +447,7 @@ TestgetwindowinfoObjCmd( if (Tcl_GetLongFromObj(interp, objv[1], &hwnd) != TCL_OK) return TCL_ERROR; - cch = tkTestWinProcs->getClassName(INT2PTR(hwnd), buf, cchBuf); + cch = GetClassName(INT2PTR(hwnd), buf, cchBuf); if (cch == 0) { Tcl_SetResult(interp, "failed to get class name: ", TCL_STATIC); AppendSystemError(interp, GetLastError()); @@ -482,7 +464,7 @@ TestgetwindowinfoObjCmd( Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("id", 2), Tcl_NewLongObj(GetWindowLongA(INT2PTR(hwnd), GWL_ID))); - cch = tkTestWinProcs->getWindowText(INT2PTR(hwnd), (LPTSTR)buf, cchBuf); + cch = GetWindowText(INT2PTR(hwnd), (LPTSTR)buf, cchBuf); textObj = Tcl_NewUnicodeObj((LPCWSTR)buf, cch); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("text", 4), textObj); |