summaryrefslogtreecommitdiffstats
path: root/win/tkWinTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-10-05 14:02:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-10-05 14:02:34 (GMT)
commit5e32543db5c3db71b03228ba36a5f883ac1597ac (patch)
tree87a0d8f7cfc8a47cf6f10fe7581a019f7666210b /win/tkWinTest.c
parentb039eb53fbc3db111d347bbb70eb88bb0ff49354 (diff)
downloadtk-5e32543db5c3db71b03228ba36a5f883ac1597ac.zip
tk-5e32543db5c3db71b03228ba36a5f883ac1597ac.tar.gz
tk-5e32543db5c3db71b03228ba36a5f883ac1597ac.tar.bz2
Remove tclWinProcs, as it is no longer being used
Diffstat (limited to 'win/tkWinTest.c')
-rw-r--r--win/tkWinTest.c26
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);