}\r
\r
if (tinyLayout != oldTinyLayout) {\r
- long style = GetWindowLong(hwndMain, GWL_STYLE);\r
+ long style = GetWindowLongPtr(hwndMain, GWL_STYLE);\r
if (tinyLayout) {\r
style &= ~WS_SYSMENU;\r
InsertMenu(hmenu, IDM_Exit, MF_BYCOMMAND, IDM_Minimize,\r
style |= WS_SYSMENU;\r
RemoveMenu(hmenu, IDM_Minimize, MF_BYCOMMAND);\r
}\r
- SetWindowLong(hwndMain, GWL_STYLE, style);\r
+ SetWindowLongPtr(hwndMain, GWL_STYLE, style);\r
\r
for (i=0; menuBarText[tinyLayout][i]; i++) {\r
ModifyMenu(hmenu, i, MF_STRING|MF_BYPOSITION|MF_POPUP, \r
boardRect.right - BUTTON_WIDTH*(N_BUTTONS-i),\r
messageRect.top, BUTTON_WIDTH, messageSize.cy, hwndMain,\r
(HMENU) buttonDesc[i].id,\r
- (HINSTANCE) GetWindowLong(hwndMain, GWL_HINSTANCE), NULL);\r
+ (HINSTANCE) GetWindowLongPtr(hwndMain, GWLP_HINSTANCE), NULL);\r
if (tinyLayout) {\r
SendMessage(buttonDesc[i].hwnd, WM_SETFONT, \r
(WPARAM)font[boardSize][MESSAGE_FONT]->hf,\r
if (buttonDesc[i].id == IDM_Pause)\r
hwndPause = buttonDesc[i].hwnd;\r
buttonDesc[i].wndproc = (WNDPROC)\r
- SetWindowLong(buttonDesc[i].hwnd, GWL_WNDPROC, (LONG) ButtonProc);\r
+ SetWindowLongPtr(buttonDesc[i].hwnd, GWLP_WNDPROC, (LONG_PTR) ButtonProc);\r
}\r
}\r
if (gridPen != NULL) DeleteObject(gridPen);\r
LRESULT CALLBACK\r
ButtonProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)\r
{\r
- int id = GetWindowLong(hwnd, GWL_ID);\r
+ int id = GetWindowLongPtr(hwnd, GWLP_ID);\r
int i, dir;\r
\r
for (i=0; i<N_BUTTONS; i++) {\r
LONG old_width, new_width;\r
\r
new_width = get_term_width(hText, FALSE);\r
- old_width = GetWindowLong(hText, GWL_USERDATA);\r
+ old_width = GetWindowLongPtr(hText, GWLP_USERDATA);\r
if (new_width != old_width)\r
{\r
ics_update_width(new_width);\r
- SetWindowLong(hText, GWL_USERDATA, new_width);\r
+ SetWindowLongPtr(hText, GWLP_USERDATA, new_width);\r
}\r
}\r
\r
hwndConsole = hDlg;\r
SetFocus(hInput);\r
consoleTextWindowProc = (WNDPROC)\r
- SetWindowLong(hText, GWL_WNDPROC, (LONG) ConsoleTextSubclass);\r
+ SetWindowLongPtr(hText, GWLP_WNDPROC, (LONG_PTR) ConsoleTextSubclass);\r
SendMessage(hText, EM_SETBKGNDCOLOR, FALSE, consoleBackgroundColor);\r
consoleInputWindowProc = (WNDPROC)\r
- SetWindowLong(hInput, GWL_WNDPROC, (LONG) ConsoleInputSubclass);\r
+ SetWindowLongPtr(hInput, GWLP_WNDPROC, (LONG_PTR) ConsoleInputSubclass);\r
SendMessage(hInput, EM_SETBKGNDCOLOR, FALSE, consoleBackgroundColor);\r
Colorize(ColorNormal, TRUE);\r
SendMessage(hInput, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) &consoleCF);\r
wMask = (WORD) SendMessage(hText, EM_GETEVENTMASK, 0, 0L);\r
SendMessage(hText, EM_SETEVENTMASK, 0, wMask | ENM_LINK);\r
SendMessage(hText, EM_AUTOURLDETECT, TRUE, 0L);\r
- SetWindowLong(hText, GWL_USERDATA, 79); // initialize the text window's width\r
+ SetWindowLongPtr(hText, GWLP_USERDATA, 79); // initialize the text window's width\r
\r
return FALSE;\r
\r