- SetWindowLong -> SetWindowLongPtr, GetWindowLong -> GetWindowLongPtr (for 64-bit compatible, see note in MSDN)

Part 3/x

svn path=/trunk/; revision=40863
This commit is contained in:
Dmitry Chapyshev 2009-05-09 12:18:13 +00:00
parent bf4ccd4eb1
commit 70d9d28b6e
21 changed files with 96 additions and 96 deletions

View file

@ -302,7 +302,7 @@ static LRESULT post_key_press(LPARAM lParam, WORD idc)
return 1;
if (!_tcscmp(ClassName, TEXT("Button"))) {
DWORD dwStyle = GetWindowLong(hCtlWnd, GWL_STYLE) & 0xF;
DWORD dwStyle = GetWindowLongPtr(hCtlWnd, GWL_STYLE) & 0xF;
/* Set states for press/release, but only for push buttons */
if (dwStyle == BS_PUSHBUTTON || dwStyle == BS_DEFPUSHBUTTON || dwStyle == BS_OWNERDRAW) {
@ -1136,7 +1136,7 @@ static void handle_context_menu(HWND hWnd, WPARAM wp, LPARAM lp)
popup.rcMargins.bottom = -1;
popup.rcMargins.left = -1;
popup.rcMargins.right = -1;
popup.idString = GetWindowLong((HWND)wp, GWL_ID);
popup.idString = GetWindowLongPtr((HWND)wp, GWL_ID);
HtmlHelp((HWND)wp, HTMLHELP_PATH("/popups.txt"), HH_DISPLAY_TEXT_POPUP, (DWORD_PTR)&popup);
}
#endif

View file

@ -275,7 +275,7 @@ CardRegion* CardWindow::CardRegionFromPoint(int x, int y)
//
LRESULT CALLBACK CardWindow::CardWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
CardWindow *cw = (CardWindow *)GetWindowLong(hwnd, 0);
CardWindow *cw = (CardWindow *)GetWindowLongPtr(hwnd, 0);
return cw->WndProc(hwnd, iMsg, wParam, lParam);
}
@ -366,7 +366,7 @@ LRESULT CALLBACK CardWindow::WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM
//
// associate this class with the window
//
SetWindowLong(hwnd, 0, (LONG_PTR)cs->lpCreateParams);
SetWindowLongPtr(hwnd, 0, (LONG_PTR)cs->lpCreateParams);
return 1;

View file

@ -14,13 +14,13 @@ VOID
SetListViewStyle(HWND hListView,
DWORD View)
{
DWORD Style = GetWindowLong(hListView, GWL_STYLE);
DWORD Style = GetWindowLongPtr(hListView, GWL_STYLE);
if ((Style & LVS_TYPEMASK) != View)
{
SetWindowLong(hListView,
GWL_STYLE,
(Style & ~LVS_TYPEMASK) | View);
SetWindowLongPtr(hListView,
GWL_STYLE,
(Style & ~LVS_TYPEMASK) | View);
}
}

View file

@ -520,11 +520,11 @@ handle_WM_SIZING(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
height = (prect->bottom - prect->top) - (g_yoff + g_xoff);
if (height < g_height || width < g_width)
{
style = GetWindowLong(g_Wnd, GWL_STYLE);
style = GetWindowLongPtr(g_Wnd, GWL_STYLE);
if (!(style & WS_HSCROLL))
{
style |= WS_HSCROLL | WS_VSCROLL;
SetWindowLong(g_Wnd, GWL_STYLE, style);
SetWindowLongPtr(g_Wnd, GWL_STYLE, style);
g_xscroll = 0;
g_yscroll = 0;
SetScrollPos(g_Wnd, SB_HORZ, g_xscroll, 1);
@ -533,12 +533,12 @@ handle_WM_SIZING(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
else if (height >= g_height && width >= g_width)
{
style = GetWindowLong(g_Wnd, GWL_STYLE);
style = GetWindowLongPtr(g_Wnd, GWL_STYLE);
if (style & WS_HSCROLL)
{
style &= ~WS_HSCROLL;
style &= ~WS_VSCROLL;
SetWindowLong(g_Wnd, GWL_STYLE, style);
SetWindowLongPtr(g_Wnd, GWL_STYLE, style);
g_xscroll = 0;
g_yscroll = 0;
}

View file

@ -152,7 +152,7 @@ bool SetIcon(HWND hConsoleWindow, HANDLE hIcon, LPARAM *pOldBIcon, LPARAM *pOldS
#else
// load the icon from the resource file -crn@ozemail.com.au 16/12/98
if(!hIcon) {
hIcon = LoadIcon ((HANDLE)GetWindowLong(hConsoleWindow,
hIcon = LoadIcon ((HANDLE)GetWindowLongPtr(hConsoleWindow,
GWL_HINSTANCE), "TELNETICON");
}
#endif

View file

@ -192,16 +192,16 @@ static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
hControl = GetDlgItem(hDlg, IDC_LOOKAT_VALUES);
if (hControl)
{
lStyle = GetWindowLong(hControl, GWL_STYLE);
SetWindowLong(hControl, GWL_STYLE, lStyle | WS_DISABLED);
lStyle = GetWindowLongPtr(hControl, GWL_STYLE);
SetWindowLongPtr(hControl, GWL_STYLE, lStyle | WS_DISABLED);
}
/* Looking at data is not yet implemented */
hControl = GetDlgItem(hDlg, IDC_LOOKAT_DATA);
if (hControl)
{
lStyle = GetWindowLong(hControl, GWL_STYLE);
SetWindowLong(hControl, GWL_STYLE, lStyle | WS_DISABLED);
lStyle = GetWindowLongPtr(hControl, GWL_STYLE);
SetWindowLongPtr(hControl, GWL_STYLE, lStyle | WS_DISABLED);
}
/* Match whole string */
@ -278,12 +278,12 @@ static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
hControl = GetDlgItem(hDlg, IDOK);
if (hControl)
{
lStyle = GetWindowLong(hControl, GWL_STYLE);
lStyle = GetWindowLongPtr(hControl, GWL_STYLE);
if (s_szSavedFindValue[0])
lStyle &= ~WS_DISABLED;
else
lStyle |= WS_DISABLED;
SetWindowLong(hControl, GWL_STYLE, lStyle);
SetWindowLongPtr(hControl, GWL_STYLE, lStyle);
RedrawWindow(hControl, NULL, NULL, RDW_INVALIDATE);
}
break;

View file

@ -126,7 +126,7 @@ HEXEDIT_Update(PHEXEDIT_DATA hed)
INT bufsize, cvislines;
GetClientRect(hed->hWndSelf, &rcClient);
hed->style = GetWindowLong(hed->hWndSelf, GWL_STYLE);
hed->style = GetWindowLongPtr(hed->hWndSelf, GWL_STYLE);
bufsize = (hed->hBuffer ? (INT) LocalSize(hed->hBuffer) : 0);
hed->nLines = max(bufsize / hed->ColumnsPerLine, 1);

View file

@ -220,7 +220,7 @@ void RefreshApplicationPage(void)
void UpdateApplicationListControlViewSetting(void)
{
DWORD dwStyle = GetWindowLongW(hApplicationPageListCtrl, GWL_STYLE);
DWORD dwStyle = GetWindowLongPtrW(hApplicationPageListCtrl, GWL_STYLE);
dwStyle &= ~(LVS_REPORT | LVS_ICON | LVS_LIST | LVS_SMALLICON);
@ -229,7 +229,7 @@ void UpdateApplicationListControlViewSetting(void)
case ID_VIEW_SMALL: dwStyle |= LVS_SMALLICON; break;
case ID_VIEW_DETAILS: dwStyle |= LVS_REPORT; break;
}
SetWindowLongW(hApplicationPageListCtrl, GWL_STYLE, dwStyle);
SetWindowLongPtrW(hApplicationPageListCtrl, GWL_STYLE, dwStyle);
RefreshApplicationPage();
}
@ -298,7 +298,7 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
!IsWindowVisible(hWnd) ||
(GetParent(hWnd) != NULL) ||
(GetWindow(hWnd, GW_OWNER) != NULL) ||
(GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
(GetWindowLongPtrW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
{
return TRUE; /* Skip this window */
}
@ -422,7 +422,7 @@ void AddOrUpdateHwnd(HWND hWnd, WCHAR *szTitle, HICON hIcon, BOOL bHung)
!IsWindowVisible(pAPLI->hWnd) ||
(GetParent(pAPLI->hWnd) != NULL) ||
(GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) ||
(GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
(GetWindowLongPtrW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
{
ImageList_Remove(hImageListLarge, item.iItem);
ImageList_Remove(hImageListSmall, item.iItem);

View file

@ -102,7 +102,7 @@ Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
hdc = BeginPaint(hWnd, &ps);
WindowId = GetWindowLongW(hWnd, GWL_ID);
WindowId = GetWindowLongPtrW(hWnd, GWL_ID);
switch (WindowId)
{

View file

@ -40,7 +40,7 @@ void TaskManager_OnOptionsAlwaysOnTop(void)
* Check or uncheck the always on top menu item
* and update main window.
*/
if ((GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0)
if ((GetWindowLongPtrW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0)
{
CheckMenuItem(hOptionsMenu, ID_OPTIONS_ALWAYSONTOP, MF_BYCOMMAND|MF_UNCHECKED);
TaskManagerSettings.AlwaysOnTop = FALSE;

View file

@ -250,7 +250,7 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
GetCursorPos(&pt);
OnTop = ((GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
OnTop = ((GetWindowLongPtrW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
hMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_TRAY_POPUP));
hPopupMenu = GetSubMenu(hMenu, 0);
@ -758,7 +758,7 @@ void TaskManager_OnRestoreMainWindow(void)
hMenu = GetMenu(hMainWnd);
hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX);
OnTop = ((GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
OnTop = ((GetWindowLongPtrW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
OpenIcon(hMainWnd);
SetForegroundWindow(hMainWnd);

View file

@ -194,8 +194,8 @@ StartDlgProc(HWND hwndDlg,
/* Center the wizard window */
CenterWindow (hwndControl);
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
/* Hide and disable the 'Cancel' button at the moment,
* we use this button to cancel the setup process
@ -259,8 +259,8 @@ LangSelDlgProc(HWND hwndDlg,
hwndControl = GetParent(hwndDlg);
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
ShowWindow (hwndControl, SW_SHOW);
@ -349,9 +349,9 @@ LangSelDlgProc(HWND hwndDlg,
break;
case PSN_QUERYCANCEL:
SetWindowLong(hwndDlg,
DWL_MSGRESULT,
MessageBox(GetParent(hwndDlg),
SetWindowLongPtr(hwndDlg,
DWL_MSGRESULT,
MessageBox(GetParent(hwndDlg),
abort_msg,
abort_title,
MB_YESNO | MB_ICONQUESTION) != IDYES);
@ -408,8 +408,8 @@ TypeDlgProc(HWND hwndDlg,
hwndControl = GetParent(hwndDlg);
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
CheckDlgButton(hwndDlg, IDC_INSTALL, BST_CHECKED);
@ -433,9 +433,9 @@ TypeDlgProc(HWND hwndDlg,
break;
case PSN_QUERYCANCEL:
SetWindowLong(hwndDlg,
DWL_MSGRESULT,
MessageBox(GetParent(hwndDlg),
SetWindowLongPtr(hwndDlg,
DWL_MSGRESULT,
MessageBox(GetParent(hwndDlg),
abort_msg,
abort_title,
MB_YESNO | MB_ICONQUESTION) != IDYES);
@ -480,8 +480,8 @@ DeviceDlgProc(HWND hwndDlg,
hwndControl = GetParent(hwndDlg);
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
/* Set title font */
/*SendDlgItemMessage(hwndDlg,
@ -530,9 +530,9 @@ DeviceDlgProc(HWND hwndDlg,
break;
case PSN_QUERYCANCEL:
SetWindowLong(hwndDlg,
DWL_MSGRESULT,
MessageBox(GetParent(hwndDlg),
SetWindowLongPtr(hwndDlg,
DWL_MSGRESULT,
MessageBox(GetParent(hwndDlg),
abort_msg,
abort_title,
MB_YESNO | MB_ICONQUESTION) != IDYES);
@ -680,8 +680,8 @@ DriveDlgProc(HWND hwndDlg,
hwndControl = GetParent(hwndDlg);
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
/* Set title font */
/*SendDlgItemMessage(hwndDlg,
@ -762,9 +762,9 @@ DriveDlgProc(HWND hwndDlg,
break;
case PSN_QUERYCANCEL:
SetWindowLong(hwndDlg,
DWL_MSGRESULT,
MessageBox(GetParent(hwndDlg),
SetWindowLongPtr(hwndDlg,
DWL_MSGRESULT,
MessageBox(GetParent(hwndDlg),
abort_msg,
abort_title,
MB_YESNO | MB_ICONQUESTION) != IDYES);
@ -799,8 +799,8 @@ SummaryDlgProc(HWND hwndDlg,
hwndControl = GetParent(hwndDlg);
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
ShowWindow(hwndControl, SW_HIDE);
@ -853,8 +853,8 @@ ProcessDlgProc(HWND hwndDlg,
hwndControl = GetParent(hwndDlg);
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
ShowWindow(hwndControl, SW_HIDE);
@ -910,8 +910,8 @@ RestartDlgProc(HWND hwndDlg,
hwndControl = GetParent(hwndDlg);
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
/* Set title font */
/*SendDlgItemMessage(hwndDlg,

View file

@ -389,7 +389,7 @@ PageWelcomeProc(
{
if(DriverFilesFound)
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CONFIG);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_CONFIG);
return TRUE;
}
break;
@ -421,7 +421,7 @@ PageInsertDiscProc(
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
break;
case PSN_WIZNEXT:
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_INSTALLING_VMWARE_TOOLS);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_INSTALLING_VMWARE_TOOLS);
break;
}
break;
@ -567,13 +567,13 @@ PageInstallingProc(
{
PropSheet_SetWizButtons(GetParent(hwndDlg), 0);
InstTerminateInstaller(FALSE);
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
return -1;
}
else
{
SendDlgItemMessage(hwndDlg, IDC_INSTALLINGPROGRESS, PBM_SETMARQUEE, FALSE, 0);
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_INSERT_VMWARE_TOOLS);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_INSERT_VMWARE_TOOLS);
}
break;
}
@ -713,12 +713,12 @@ PageConfigProc(
{
if(StartVMwConfigWizard)
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
return TRUE;
}
if(DriverFilesFound)
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_WELCOMEPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_WELCOMEPAGE);
return TRUE;
}
break;
@ -797,7 +797,7 @@ PageChooseActionProc(
break;
case PSN_WIZBACK:
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
return TRUE;
}
case PSN_WIZNEXT:
@ -815,7 +815,7 @@ PageChooseActionProc(
UninstallDriver = (i == IDC_UNINSTALL);
SetWindowLong(hwndDlg, DWL_MSGRESULT, SelPage[i - IDC_CONFIGSETTINGS]);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, SelPage[i - IDC_CONFIGSETTINGS]);
return TRUE;
}
}
@ -849,7 +849,7 @@ PageSelectDriverProc(
break;
case PSN_WIZBACK:
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
return TRUE;
}
case PSN_WIZNEXT:
@ -876,7 +876,7 @@ PageSelectDriverProc(
WCHAR Msg[1024];
LoadString(hAppInstance, (ActivateVBE ? IDS_FAILEDTOSELVBEDRIVER : IDS_FAILEDTOSELVGADRIVER), Msg, sizeof(Msg) / sizeof(WCHAR));
MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING);
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_SELECTDRIVER);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTDRIVER);
return TRUE;
}
break;
@ -925,7 +925,7 @@ PageDoUninstallProc(
WCHAR Msg[1024];
LoadString(hAppInstance, (ActivateVBE ? IDS_FAILEDTOSELVBEDRIVER : IDS_FAILEDTOSELVGADRIVER), Msg, sizeof(Msg) / sizeof(WCHAR));
MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING);
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_SELECTDRIVER);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTDRIVER);
return TRUE;
}
ShowUninstNotice(GetParent(hwndDlg));

View file

@ -222,7 +222,7 @@ ButtonSubclassWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (uMsg == WM_MOUSEMOVE)
{
i = GetWindowLong(hWnd, GWL_ID);
i = GetWindowLongPtr(hWnd, GWL_ID);
if (nTopic != i)
{
nTopic = i;

View file

@ -38,17 +38,17 @@ SetWindowStyle(IN HWND hWnd,
ASSERT((~dwStyleMask & dwStyle) == 0);
PrevStyle = GetWindowLong(hWnd,
GWL_STYLE);
PrevStyle = GetWindowLongPtr(hWnd,
GWL_STYLE);
if (PrevStyle != 0 &&
(PrevStyle & dwStyleMask) != dwStyle)
{
Style = PrevStyle & ~dwStyleMask;
Style |= dwStyle;
PrevStyle = SetWindowLong(hWnd,
GWL_STYLE,
Style);
PrevStyle = SetWindowLongPtr(hWnd,
GWL_STYLE,
Style);
}
return PrevStyle;
@ -63,17 +63,17 @@ SetWindowExStyle(IN HWND hWnd,
ASSERT((~dwStyleMask & dwStyle) == 0);
PrevStyle = GetWindowLong(hWnd,
GWL_EXSTYLE);
PrevStyle = GetWindowLongPtr(hWnd,
GWL_EXSTYLE);
if (PrevStyle != 0 &&
(PrevStyle & dwStyleMask) != dwStyle)
{
Style = PrevStyle & ~dwStyleMask;
Style |= dwStyle;
PrevStyle = SetWindowLong(hWnd,
GWL_EXSTYLE,
Style);
PrevStyle = SetWindowLongPtr(hWnd,
GWL_EXSTYLE,
Style);
}
return PrevStyle;

View file

@ -1326,8 +1326,8 @@ TaskSwitchWnd_EnumWindowsProc(IN HWND hWnd,
/* Don't list popup windows and also no tool windows */
if (GetWindow(hWnd,
GW_OWNER) == NULL &&
!(GetWindowLong(hWnd,
GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
!(GetWindowLongPtr(hWnd,
GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
{
TaskSwitchWnd_AddTask(This,
hWnd);

View file

@ -269,8 +269,8 @@ TrayClockWnd_UpdateWnd(IN OUT PTRAY_CLOCK_WND_DATA This)
NMHDR nmh;
nmh.hwndFrom = This->hWnd;
nmh.idFrom = GetWindowLong(This->hWnd,
GWL_ID);
nmh.idFrom = GetWindowLongPtr(This->hWnd,
GWL_ID);
nmh.code = NTNWM_REALIGN;
SendMessage(This->hWndNotify,
@ -716,11 +716,11 @@ TrayNotifyWnd_UpdateStyle(IN OUT PTRAY_NOTIFY_WND_DATA This)
RECT rcClient = { 0, 0, 0, 0 };
if (AdjustWindowRectEx(&rcClient,
GetWindowLong(This->hWnd,
GWL_STYLE),
GetWindowLongPtr(This->hWnd,
GWL_STYLE),
FALSE,
GetWindowLong(This->hWnd,
GWL_EXSTYLE)))
GetWindowLongPtr(This->hWnd,
GWL_EXSTYLE)))
{
This->szNonClient.cx = rcClient.right - rcClient.left;
This->szNonClient.cy = rcClient.bottom - rcClient.top;

View file

@ -362,11 +362,11 @@ ITrayWindowImpl_GetMinimumWindowSize(IN OUT ITrayWindowImpl *This,
RECT rcMin = {0};
AdjustWindowRectEx(&rcMin,
GetWindowLong(This->hWnd,
GWL_STYLE),
GetWindowLongPtr(This->hWnd,
GWL_STYLE),
FALSE,
GetWindowLong(This->hWnd,
GWL_EXSTYLE));
GetWindowLongPtr(This->hWnd,
GWL_EXSTYLE));
*pRect = rcMin;
}

View file

@ -104,7 +104,7 @@ int DesktopSettingsDlg::Notify(int id, NMHDR* pnmh)
{
switch(pnmh->code) {
case PSN_QUERYINITIALFOCUS:
SetWindowLong(_hwnd, DWL_MSGRESULT, (LPARAM)GetDlgItem(_hwnd, IDC_ICON_ALIGN_0+_alignment_cur));
SetWindowLongPtr(_hwnd, DWL_MSGRESULT, (LPARAM)GetDlgItem(_hwnd, IDC_ICON_ALIGN_0+_alignment_cur));
break;
case PSN_APPLY:

View file

@ -143,9 +143,9 @@ extern void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR*
#endif
#define SetDlgCtrlID(hwnd, id) SetWindowLong(hwnd, GWL_ID, id)
#define SetWindowStyle(hwnd, val) (DWORD)SetWindowLong(hwnd, GWL_STYLE, val)
#define SetWindowExStyle(h, val) (DWORD)SetWindowLong(hwnd, GWL_EXSTYLE, val)
#define SetDlgCtrlID(hwnd, id) SetWindowLongPtr(hwnd, GWL_ID, id)
#define SetWindowStyle(hwnd, val) (DWORD)SetWindowLongPtr(hwnd, GWL_STYLE, val)
#define SetWindowExStyle(h, val) (DWORD)SetWindowLongPtr(hwnd, GWL_EXSTYLE, val)
#define Window_SetIcon(hwnd, type, hicon) (HICON)SendMessage(hwnd, WM_SETICON, type, (LPARAM)(hicon))

View file

@ -732,7 +732,7 @@ INT_PTR CALLBACK Window::DialogProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
return TRUE; // message has been processed
case WM_NOTIFYFORMAT:
SetWindowLong(hwnd, DWLP_MSGRESULT, NFR_CURRENT); // set return value NFR_CURRENT
SetWindowLongPtr(hwnd, DWLP_MSGRESULT, NFR_CURRENT); // set return value NFR_CURRENT
return TRUE; // message has been processed
case WM_NCDESTROY:
@ -1418,7 +1418,7 @@ INT_PTR CALLBACK PropSheetPageDlg::DialogProc(HWND hwnd, UINT nmsg, WPARAM wpara
return TRUE; // message has been processed
case WM_NOTIFYFORMAT:
SetWindowLong(hwnd, DWLP_MSGRESULT, NFR_CURRENT); // set return value NFR_CURRENT
SetWindowLongPtr(hwnd, DWLP_MSGRESULT, NFR_CURRENT); // set return value NFR_CURRENT
return TRUE; // message has been processed
case WM_NCDESTROY: