summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-20 10:30:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-20 10:30:42 (GMT)
commitd6b9036b665ab06fcb218295a69a011b385c9609 (patch)
treed6b60f913b0ccbe5b65bccf9956c2ce24696a80f /win
parent4801848f58e2c408b9ec56a5d1db5625447da27c (diff)
downloadtk-d6b9036b665ab06fcb218295a69a011b385c9609.zip
tk-d6b9036b665ab06fcb218295a69a011b385c9609.tar.gz
tk-d6b9036b665ab06fcb218295a69a011b385c9609.tar.bz2
One missing use of TCL_INDEX_NONE in stead of -1.
Use some more type-casts, making compiling Tk less sensitive to the use of -DUNICODE or not.
Diffstat (limited to 'win')
-rw-r--r--win/tkWinButton.c2
-rw-r--r--win/tkWinCursor.c6
-rw-r--r--win/tkWinWm.c2
-rw-r--r--win/ttkWinMonitor.c6
4 files changed, 8 insertions, 8 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c
index 6fc5cf1..fc5d9e2 100644
--- a/win/tkWinButton.c
+++ b/win/tkWinButton.c
@@ -131,7 +131,7 @@ InitBoxes(void)
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- hrsrc = FindResourceW(module, L"buttons", RT_BITMAP);
+ hrsrc = FindResourceW(module, L"buttons", (LPWSTR) RT_BITMAP);
if (hrsrc == NULL) {
Tcl_Panic("FindResourceW() failed for buttons bitmap resource, "
"resources in tk_base.rc must be linked into Tk dll or static executable");
diff --git a/win/tkWinCursor.c b/win/tkWinCursor.c
index 3fe9899..3cf33e8 100644
--- a/win/tkWinCursor.c
+++ b/win/tkWinCursor.c
@@ -41,7 +41,7 @@ typedef struct {
static struct CursorName {
const char *name;
- LPCWSTR id;
+ LPCTSTR id;
} cursorNames[] = {
{"starting", IDC_APPSTARTING},
{"arrow", IDC_ARROW},
@@ -71,7 +71,7 @@ static struct CursorName {
* The default cursor is used whenever no other cursor has been specified.
*/
-#define TK_DEFAULT_CURSOR IDC_ARROW
+#define TK_DEFAULT_CURSOR (LPCWSTR)IDC_ARROW
/*
*----------------------------------------------------------------------
@@ -145,7 +145,7 @@ TkGetCursorByName(
for (namePtr = cursorNames; namePtr->name != NULL; namePtr++) {
if (strcmp(namePtr->name, argv[0]) == 0) {
- cursorPtr->winCursor = LoadCursorW(NULL, namePtr->id);
+ cursorPtr->winCursor = LoadCursorW(NULL, (LPCWSTR) namePtr->id);
break;
}
}
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 1c895dd..167b8ea 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -892,7 +892,7 @@ InitWindowClass(
tsdPtr->iconPtr = titlebaricon;
}
- class.hCursor = LoadCursorW(NULL, IDC_ARROW);
+ class.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW);
if (!RegisterClassW(&class)) {
Tcl_Panic("Unable to register TkTopLevel class");
diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c
index 6a40866..8bcfca2 100644
--- a/win/ttkWinMonitor.c
+++ b/win/ttkWinMonitor.c
@@ -81,9 +81,9 @@ CreateThemeMonitorWindow(HINSTANCE hinst, Tcl_Interp *interp)
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hinst;
- wc.hIcon = LoadIconW(NULL, IDI_APPLICATION);
- wc.hIconSm = LoadIconW(NULL, IDI_APPLICATION);
- wc.hCursor = LoadCursorW(NULL, IDC_ARROW);
+ wc.hIcon = LoadIconW(NULL, (LPCWSTR)IDI_APPLICATION);
+ wc.hIconSm = LoadIconW(NULL, (LPCWSTR)IDI_APPLICATION);
+ wc.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
wc.lpszMenuName = name;
wc.lpszClassName = name;