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

Part 4/x

svn path=/trunk/; revision=40864
This commit is contained in:
Dmitry Chapyshev 2009-05-09 12:27:40 +00:00
parent 70d9d28b6e
commit f99fbc6c02
43 changed files with 220 additions and 220 deletions

View file

@ -197,7 +197,7 @@ DisplayPageProc(HWND hwndDlg,
break;
case WM_HSCROLL:
switch (GetWindowLong((HWND) lParam, GWL_ID))
switch (GetWindowLongPtr((HWND) lParam, GWL_ID))
{
case IDC_CURSOR_BLINK_TRACK:
i = SendDlgItemMessage(hwndDlg, IDC_CURSOR_BLINK_TRACK, TBM_GETPOS, 0, 0);

View file

@ -88,7 +88,7 @@ MouseKeysDlgProc(HWND hwndDlg,
break;
case WM_HSCROLL:
switch (GetWindowLong((HWND) lParam, GWL_ID))
switch (GetWindowLongPtr((HWND) lParam, GWL_ID))
{
case IDC_MOUSEKEYS_SPEED_TRACK:
i = SendDlgItemMessage(hwndDlg, IDC_MOUSEKEYS_SPEED_TRACK, TBM_GETPOS, 0, 0);

View file

@ -138,7 +138,7 @@ WelcomeDlgProc(HWND hwndDlg,
}
SendDlgItemMessage(hwndDlg, IDC_SHORTCUT_LOCATION, EM_SETSEL, 0, -1);
SetFocus(GetDlgItem(hwndDlg, IDC_SHORTCUT_LOCATION));
SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE);
return -1;
}
else

View file

@ -449,16 +449,16 @@ GetCurrentView(HWND hwndDlg, UINT ViewControl, UINT ListControl)
switch (nCurrSel)
{
case 0:
SetWindowLong(GetDlgItem(hwndDlg, ListControl),
GWL_STYLE, LVS_ICON | LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP);
SetWindowLongPtr(GetDlgItem(hwndDlg, ListControl),
GWL_STYLE, LVS_ICON | LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP);
break;
case 1:
SetWindowLong(GetDlgItem(hwndDlg, ListControl),
GWL_STYLE,LVS_LIST | LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP);
SetWindowLongPtr(GetDlgItem(hwndDlg, ListControl),
GWL_STYLE,LVS_LIST | LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP);
break;
case 2:
SetWindowLong(GetDlgItem(hwndDlg, ListControl),
GWL_STYLE,LVS_REPORT | LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP);
SetWindowLongPtr(GetDlgItem(hwndDlg, ListControl),
GWL_STYLE,LVS_REPORT | LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP);
break;
}
}

View file

@ -93,7 +93,7 @@ ColorsProc(
else
{
/* options have already been applied */
SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
return TRUE;
}
return TRUE;

View file

@ -143,18 +143,18 @@ ApplyConsoleInfo(HWND hwndDlg, PConsoleInfo pConInfo)
if (res == IDCANCEL)
{
/* dont destroy when user presses cancel */
SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE);
}
else if ( res == IDC_RADIO_APPLY_ALL )
{
pConInfo->AppliedConfig = TRUE;
SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SendMessage(pConInfo->hConsoleWindow, PM_APPLY_CONSOLE_INFO, (WPARAM)pConInfo, (LPARAM)TRUE);
}
else if ( res == IDC_RADIO_APPLY_CURRENT )
{
pConInfo->AppliedConfig = TRUE;
SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SendMessage(pConInfo->hConsoleWindow, PM_APPLY_CONSOLE_INFO, (WPARAM)pConInfo, (LPARAM)TRUE);
}
}

View file

@ -62,7 +62,7 @@ OptionsProc(
else
{
/* options have already been applied */
SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
return TRUE;
}
return TRUE;

View file

@ -172,9 +172,9 @@ IsConnctedPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSN_WIZNEXT:
{
if (SendDlgItemMessage(hwndDlg, IDC_NOTCONNECTED, BM_GETCHECK, 0, 0) == BST_CHECKED)
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_NOTCONNECTEDPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_NOTCONNECTEDPAGE);
else
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROBELISTPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_PROBELISTPAGE);
return TRUE;
}
@ -244,7 +244,7 @@ NotConnectedPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSN_WIZBACK:
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_ISCONNECTEDPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_ISCONNECTEDPAGE);
return TRUE;
}
}
@ -429,7 +429,7 @@ ProbeListPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (Index == 0)
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE);
}
else
{
@ -443,7 +443,7 @@ ProbeListPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
pts = (PWSTR) Item.lParam;
wcscpy(pDeviceStatusText, pts);
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_HWSTATUSPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_HWSTATUSPAGE);
}
return TRUE;
}
@ -499,9 +499,9 @@ SelectWayPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSN_WIZNEXT:
{
if (SendDlgItemMessage(hwndDlg, IDC_AUTOINSTALL, BM_GETCHECK, 0, 0) == BST_CHECKED)
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRESSPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_PROGRESSPAGE);
else
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_HWTYPESPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_HWTYPESPAGE);
return TRUE;
}
@ -542,7 +542,7 @@ DevStatusPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSN_WIZBACK:
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROBELISTPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_PROBELISTPAGE);
return TRUE;
}
}
@ -735,7 +735,7 @@ HdTypesPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSN_WIZBACK:
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE);
return TRUE;
}
}
@ -765,7 +765,7 @@ ProgressPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSN_WIZBACK:
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE);
return TRUE;
}
}

View file

@ -454,7 +454,7 @@ TimeZonePageProc(HWND hwndDlg,
{
SetAutoDaylightInfo(GetDlgItem(hwndDlg, IDC_AUTODAYLIGHT));
SetLocalTimeZone(GetDlgItem(hwndDlg, IDC_TIMEZONELIST));
SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
return TRUE;
}

View file

@ -102,7 +102,7 @@ Main_DirectDraw_SetCooperativeLevel (LPDDRAWI_DIRECTDRAW_INT This, HWND hwnd, DW
_SEH2_LEAVE;
}
if( (GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD) )
if( (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_CHILD) )
{
retVal = DDERR_INVALIDPARAMS;
_SEH2_LEAVE;

View file

@ -421,9 +421,9 @@ DisplayAdapterDlgProc(HWND hwndDlg,
{
case PSN_APPLY:
{
SetWindowLong(hwndDlg,
DWL_MSGRESULT,
ApplyDisplayAdapterChanges(This));
SetWindowLongPtr(hwndDlg,
DWL_MSGRESULT,
ApplyDisplayAdapterChanges(This));
break;
}

View file

@ -530,9 +530,9 @@ MonitorDlgProc(HWND hwndDlg,
{
case PSN_APPLY:
{
SetWindowLong(hwndDlg,
DWL_MSGRESULT,
ApplyMonitorChanges(This));
SetWindowLongPtr(hwndDlg,
DWL_MSGRESULT,
ApplyMonitorChanges(This));
break;
}

View file

@ -129,8 +129,8 @@ static DWORD GetBandSiteViewMode(BandSite *This)
DWORD dwStyle;
/* FIXME: What about DBIF_VIEWMODE_FLOATING and DBIF_VIEWMODE_TRANSPARENT? */
dwStyle = GetWindowLong(This->hWndRebar,
GWL_STYLE);
dwStyle = GetWindowLongPtr(This->hWndRebar,
GWL_STYLE);
if (dwStyle & CCS_VERT)
return DBIF_VIEWMODE_VERTICAL;
@ -988,8 +988,8 @@ static HRESULT WINAPI BandSite_IDeskBarClient_SetModeDBC(IDeskBarClient *iface,
if (This->hWndRebar == NULL)
return E_FAIL;
dwStyle = dwPrevStyle = GetWindowLong(This->hWndRebar,
GWL_STYLE);
dwStyle = dwPrevStyle = GetWindowLongPtr(This->hWndRebar,
GWL_STYLE);
if (dwMode & DBIF_VIEWMODE_VERTICAL)
dwStyle |= CCS_VERT;
@ -998,9 +998,9 @@ static HRESULT WINAPI BandSite_IDeskBarClient_SetModeDBC(IDeskBarClient *iface,
if (dwStyle != dwPrevStyle)
{
SetWindowLong(This->hWndRebar,
GWL_STYLE,
dwPrevStyle);
SetWindowLongPtr(This->hWndRebar,
GWL_STYLE,
dwPrevStyle);
}
return S_OK;

View file

@ -750,7 +750,7 @@ LANStatusUiDlg(
if (lppsn->hdr.code == PSN_APPLY || lppsn->hdr.code == PSN_RESET)
{
pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER);
SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
pContext->hwndDlg = NULL;
return TRUE;
}

View file

@ -443,8 +443,8 @@ WelcomeDlgProc(
CenterWindow(hwndControl);
/* Hide the system menu */
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(
@ -549,8 +549,8 @@ CHSourceDlgProc(
CenterWindow(hwndControl);
/* Hide the system menu */
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
PopulateCustomPathCombo(GetDlgItem(hwndDlg, IDC_COMBO_PATH));
@ -706,8 +706,8 @@ SearchDrvDlgProc(
(LPARAM)DevInstData->buffer);
/* Hide the system menu */
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
break;
}
@ -741,7 +741,7 @@ SearchDrvDlgProc(
case PSN_KILLACTIVE:
if (hThread != 0)
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, TRUE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, TRUE);
return TRUE;
}
break;
@ -801,8 +801,8 @@ InstallDrvDlgProc(
(LPARAM)DevInstData->drvInfoData.Description);
/* Hide the system menu */
dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
break;
}
@ -847,7 +847,7 @@ InstallDrvDlgProc(
case PSN_KILLACTIVE:
if (hThread != 0)
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, TRUE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, TRUE);
return TRUE;
}
break;

View file

@ -109,13 +109,13 @@ INT_PTR CALLBACK PickIconProc(HWND hwndDlg,
WCHAR szText[MAX_PATH], szTitle[100], szFilter[100];
OPENFILENAMEW ofn = {0};
PPICK_ICON_CONTEXT pIconContext = (PPICK_ICON_CONTEXT)GetWindowLong(hwndDlg, DWLP_USER);
PPICK_ICON_CONTEXT pIconContext = (PPICK_ICON_CONTEXT)GetWindowLongPtr(hwndDlg, DWLP_USER);
switch(uMsg)
{
case WM_INITDIALOG:
pIconContext = (PPICK_ICON_CONTEXT)lParam;
SetWindowLong(hwndDlg, DWLP_USER, (LONG)pIconContext);
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)pIconContext);
pIconContext->hDlgCtrl = GetDlgItem(hwndDlg, IDC_PICKICON_LIST);
EnumResourceNamesW(pIconContext->hLibrary, RT_ICON, EnumPickIconResourceProc, (LPARAM)pIconContext);
if (PathUnExpandEnvStringsW(pIconContext->szName, szText, MAX_PATH))

View file

@ -514,13 +514,13 @@ DriveGeneralDlg(
}
if (lppsn->hdr.code == PSN_APPLY)
{
lpstr = (LPWSTR)GetWindowLong(hwndDlg, DWLP_USER);
lpstr = (LPWSTR)GetWindowLongPtr(hwndDlg, DWLP_USER);
if (lpstr && SendDlgItemMessageW(hwndDlg, 14000, WM_GETTEXT, sizeof(szPath)/sizeof(WCHAR), (LPARAM)szPath))
{
szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0';
SetVolumeLabelW(lpstr, szPath);
}
SetWindowLong( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR );
SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR );
return TRUE;
}
break;

View file

@ -513,11 +513,11 @@ FolderPropertiesGeneralDlg(
}
break;
case WM_DESTROY:
pContext = (PFOLDER_PROPERTIES_CONTEXT)GetWindowLong(hwndDlg, DWL_USER);
pContext = (PFOLDER_PROPERTIES_CONTEXT)GetWindowLongPtr(hwndDlg, DWL_USER);
SHFree((LPVOID)pContext);
break;
case WM_NOTIFY:
pContext = (PFOLDER_PROPERTIES_CONTEXT)GetWindowLong(hwndDlg, DWL_USER);
pContext = (PFOLDER_PROPERTIES_CONTEXT)GetWindowLongPtr(hwndDlg, DWL_USER);
lppsn = (LPPSHNOTIFY) lParam;
if (lppsn->hdr.code == PSN_APPLY)
{
@ -540,7 +540,7 @@ FolderPropertiesGeneralDlg(
SetFileAttributesW(pContext->szFolderPath, Attribute);
}
SetWindowLong( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR );
SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR );
return TRUE;
}
break;

View file

@ -536,7 +536,7 @@ SH_FileVersionInitialize(HWND hwndDlg, WCHAR *lpfilename)
SH_FileVersionQuerySetListText(hwndDlg, pBuf, wOriginalFilename, &str, lang, code);
SH_FileVersionQuerySetListText(hwndDlg, pBuf, wProductName, &str, lang, code);
SH_FileVersionQuerySetListText(hwndDlg, pBuf, wProductVersion, &str, lang, code);
SetWindowLong(hwndDlg, DWL_USER, (LONG)pBuf);
SetWindowLongPtr(hwndDlg, DWL_USER, (LONG)pBuf);
/* select first item */
hDlgCtrl = GetDlgItem(hwndDlg, 14009);
@ -610,7 +610,7 @@ SH_FileVersionDlgProc(HWND hwndDlg,
break;
case WM_DESTROY:
buf = (LPVOID) GetWindowLong(hwndDlg, DWL_USER);
buf = (LPVOID) GetWindowLongPtr(hwndDlg, DWL_USER);
HeapFree(GetProcessHeap(), 0, buf);
break;

View file

@ -636,12 +636,12 @@ static BOOL CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam,
LONG YOffset;
OPEN_WITH_CONTEXT Context;
poainfo = (OPENASINFO*) GetWindowLong(hwndDlg, DWLP_USER);
poainfo = (OPENASINFO*) GetWindowLongPtr(hwndDlg, DWLP_USER);
switch(uMsg)
{
case WM_INITDIALOG:
SetWindowLong(hwndDlg, DWLP_USER, (LONG)lParam);
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)lParam);
poainfo = (OPENASINFO*)lParam;
if (!(poainfo->oaifInFlags & OAIF_ALLOW_REGISTRATION))
EnableWindow(GetDlgItem(hwndDlg, 14003), FALSE);

View file

@ -2633,7 +2633,7 @@ SH_ShellLinkDlgProc(
{
//FIXME load localized error msg
MessageBoxW( hwndDlg, L"file not existing", szBuffer, MB_OK );
SetWindowLong( hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE );
SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE );
return TRUE;
}
ptr = wcsrchr(szBuffer, L'.');
@ -2641,7 +2641,7 @@ SH_ShellLinkDlgProc(
{
// FIXME load localized error msg
MessageBoxW( hwndDlg, L"You cannot create a link to a shortcut", L"Error", MB_ICONERROR );
SetWindowLong( hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE );
SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE );
return TRUE;
}
@ -2649,7 +2649,7 @@ SH_ShellLinkDlgProc(
TRACE("This %p sLinkPath %S\n", This, This->sLinkPath);
IPersistFile_fnSave( (IPersistFile*)&This->lpvtblPersistFile, This->sLinkPath, TRUE );
SetWindowLong( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR );
SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR );
return TRUE;
}
break;

View file

@ -522,12 +522,12 @@ void WINAPI DragAcceptFiles(HWND hWnd, BOOL b)
LONG exstyle;
if( !IsWindow(hWnd) ) return;
exstyle = GetWindowLongA(hWnd,GWL_EXSTYLE);
exstyle = GetWindowLongPtrA(hWnd,GWL_EXSTYLE);
if (b)
exstyle |= WS_EX_ACCEPTFILES;
else
exstyle &= ~WS_EX_ACCEPTFILES;
SetWindowLongA(hWnd,GWL_EXSTYLE,exstyle);
SetWindowLongPtrA(hWnd,GWL_EXSTYLE,exstyle);
}
/*************************************************************************

View file

@ -1437,7 +1437,7 @@ BitBucketDlg(
}
if (StoreDriveSettings(hwndDlg))
{
SetWindowLong( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR );
SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR );
return TRUE;
}
}

View file

@ -267,8 +267,8 @@ static void SetStyle(IShellViewImpl * This, DWORD dwAdd, DWORD dwRemove)
TRACE("(%p)\n", This);
tmpstyle = GetWindowLongW(This->hWndList, GWL_STYLE);
SetWindowLongW(This->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove));
tmpstyle = GetWindowLongPtrW(This->hWndList, GWL_STYLE);
SetWindowLongPtrW(This->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove));
}
/**********************************************************

View file

@ -293,7 +293,7 @@ ImageView_InitControls(HWND hwnd)
0, 0, 0, 0, hwnd, NULL, hInstance, NULL);
SetClassLongPtr(hDispWnd, GCL_STYLE, CS_HREDRAW | CS_VREDRAW);
PrevProc = (WNDPROC) SetWindowLong(hDispWnd, GWL_WNDPROC, (LPARAM) ImageView_DispWndProc);
PrevProc = (WNDPROC) SetWindowLongPtr(hDispWnd, GWL_WNDPROC, (LPARAM) ImageView_DispWndProc);
ImageView_CreateToolBar(hwnd);
}
@ -407,7 +407,7 @@ ImageView_WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
case WM_DESTROY:
{
ImageView_SaveSettings(hwnd);
SetWindowLong(hDispWnd, GWL_WNDPROC, (LPARAM) PrevProc);
SetWindowLongPtr(hDispWnd, GWL_WNDPROC, (LPARAM) PrevProc);
PostQuitMessage(0);
break;
}

View file

@ -1081,11 +1081,11 @@ HRESULT WINAPI IUnknown_Exec(IUnknown* lpUnknown, REFGUID pguidCmdGroup,
*/
LONG WINAPI SHSetWindowBits(HWND hwnd, INT offset, UINT wMask, UINT wFlags)
{
LONG ret = GetWindowLongA(hwnd, offset);
LONG ret = GetWindowLongPtrA(hwnd, offset);
LONG newFlags = (wFlags & wMask) | (ret & ~wFlags);
if (newFlags != ret)
ret = SetWindowLongA(hwnd, offset, newFlags);
ret = SetWindowLongPtrA(hwnd, offset, newFlags);
return ret;
}

View file

@ -246,8 +246,8 @@ WelcomeDlgProc(HWND hwndDlg,
CenterWindow (hwndControl);
/* Hide the system menu */
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 */
hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
@ -275,7 +275,7 @@ WelcomeDlgProc(HWND hwndDlg,
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT);
if (SetupData.UnattendSetup)
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_ACKPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_ACKPAGE);
return TRUE;
}
break;
@ -376,7 +376,7 @@ AckPageDlgProc(HWND hwndDlg,
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
if (SetupData.UnattendSetup)
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_OWNERPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_OWNERPAGE);
return TRUE;
}
break;
@ -483,7 +483,7 @@ OwnerPageDlgProc(HWND hwndDlg,
SendMessage(GetDlgItem(hwndDlg, IDC_OWNERORGANIZATION), WM_SETTEXT, 0, (LPARAM)SetupData.OwnerOrganization);
if (WriteOwnerSettings(SetupData.OwnerName, SetupData.OwnerOrganization))
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_COMPUTERPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_COMPUTERPAGE);
return TRUE;
}
}
@ -504,7 +504,7 @@ OwnerPageDlgProc(HWND hwndDlg,
MessageBoxW(hwndDlg, ErrorName, Title, MB_ICONERROR | MB_OK);
SetFocus(GetDlgItem(hwndDlg, IDC_OWNERNAME));
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
return TRUE;
}
@ -515,7 +515,7 @@ OwnerPageDlgProc(HWND hwndDlg,
if (!WriteOwnerSettings(OwnerName, OwnerOrganization))
{
SetFocus(GetDlgItem(hwndDlg, IDC_OWNERNAME));
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
return TRUE;
}
@ -623,7 +623,7 @@ ComputerPageDlgProc(HWND hwndDlg,
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
if (SetupData.UnattendSetup && WriteComputerSettings(SetupData.ComputerName, hwndDlg))
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_LOCALEPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_LOCALEPAGE);
return TRUE;
}
break;
@ -638,7 +638,7 @@ ComputerPageDlgProc(HWND hwndDlg,
}
MessageBoxW(hwndDlg, EmptyComputerName, Title, MB_ICONERROR | MB_OK);
SetFocus(GetDlgItem(hwndDlg, IDC_COMPUTERNAME));
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
return TRUE;
}
@ -648,7 +648,7 @@ ComputerPageDlgProc(HWND hwndDlg,
if (!WriteComputerSettings(ComputerName, hwndDlg))
{
SetFocus(GetDlgItem(hwndDlg, IDC_COMPUTERNAME));
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
return TRUE;
}
@ -663,7 +663,7 @@ ComputerPageDlgProc(HWND hwndDlg,
wcscpy(EmptyPassword, L"You must enter a password !");
}
MessageBoxW(hwndDlg, EmptyPassword, Title, MB_ICONERROR | MB_OK);
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
return TRUE;
}
#else
@ -679,7 +679,7 @@ ComputerPageDlgProc(HWND hwndDlg,
wcscpy(NotMatchPassword, L"The passwords you entered do not match. Please enter the desired password again.");
}
MessageBoxW(hwndDlg, NotMatchPassword, Title, MB_ICONERROR | MB_OK);
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
return TRUE;
}
@ -695,7 +695,7 @@ ComputerPageDlgProc(HWND hwndDlg,
wcscpy(WrongPassword, L"The password you entered contains invalid characters. Please enter a cleaned password.");
}
MessageBoxW(hwndDlg, WrongPassword, Title, MB_ICONERROR | MB_OK);
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
return TRUE;
break;
}
@ -901,7 +901,7 @@ LocalePageDlgProc(HWND hwndDlg,
}
RunControlPanelApplet(hwndDlg, szBuffer);
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_DATETIMEPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_DATETIMEPAGE);
return TRUE;
}
break;
@ -1500,7 +1500,7 @@ DateTimePageDlgProc(HWND hwndDlg,
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
if (SetupData->UnattendSetup && WriteDateTimeSettings(hwndDlg, SetupData))
{
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROCESSPAGE);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_PROCESSPAGE);
return TRUE;
}
break;

View file

@ -163,17 +163,17 @@ const struct builtin_class_descr BUTTON_builtin_class =
static inline LONG get_button_state( HWND hwnd )
{
return GetWindowLongW( hwnd, STATE_GWL_OFFSET );
return GetWindowLongPtrW( hwnd, STATE_GWL_OFFSET );
}
static inline void set_button_state( HWND hwnd, LONG state )
{
SetWindowLongW( hwnd, STATE_GWL_OFFSET, state );
SetWindowLongPtrW( hwnd, STATE_GWL_OFFSET, state );
}
static __inline void set_ui_state( HWND hwnd, LONG flags )
{
SetWindowLongW( hwnd, UISTATE_GWL_OFFSET, flags );
SetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET, flags );
}
static __inline LONG get_ui_state( HWND hwnd )
@ -254,7 +254,7 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg,
{
RECT rect;
POINT pt;
LONG style = GetWindowLongW( hWnd, GWL_STYLE );
LONG style = GetWindowLongPtrW( hWnd, GWL_STYLE );
UINT btn_type = get_button_type( style );
LONG state;
HANDLE oldHbitmap;
@ -479,7 +479,7 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg,
if ((wParam & 0x0f) >= MAX_BTN_TYPE) break;
btn_type = wParam & 0x0f;
style = (style & ~0x0f) | btn_type;
SetWindowLongW( hWnd, GWL_STYLE, style );
SetWindowLongPtrW( hWnd, GWL_STYLE, style );
/* Only redraw if lParam flag is set.*/
if (lParam)
@ -528,7 +528,7 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg,
{
if (wParam) style |= WS_TABSTOP;
else style &= ~WS_TABSTOP;
SetWindowLongW( hWnd, GWL_STYLE, style );
SetWindowLongPtrW( hWnd, GWL_STYLE, style );
}
if ((state & 3) != wParam)
{
@ -667,8 +667,8 @@ static UINT BUTTON_BStoDT( DWORD style, DWORD ex_style )
*/
static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc)
{
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
LONG ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE );
LONG style = GetWindowLongPtrW( hwnd, GWL_STYLE );
LONG ex_style = GetWindowLongPtrW( hwnd, GWL_EXSTYLE );
WCHAR *text;
ICONINFO iconInfo;
BITMAP bm;
@ -786,7 +786,7 @@ static void BUTTON_DrawLabel(HWND hwnd, HDC hdc, UINT dtFlags, const RECT *rc)
HBRUSH hbr = 0;
UINT flags = IsWindowEnabled(hwnd) ? DSS_NORMAL : DSS_DISABLED;
LONG state = get_button_state( hwnd );
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
LONG style = GetWindowLongPtrW( hwnd, GWL_STYLE );
WCHAR *text = NULL;
/* FIXME: To draw disabled label in Win31 look-and-feel, we probably
@ -845,7 +845,7 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
COLORREF oldTxtColor;
HFONT hFont;
LONG state = get_button_state( hwnd );
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
LONG style = GetWindowLongPtrW( hwnd, GWL_STYLE );
BOOL pushedState = (state & BUTTON_HIGHLIGHTED);
HWND parent;
@ -934,7 +934,7 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
UINT dtFlags;
HFONT hFont;
LONG state = get_button_state( hwnd );
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
LONG style = GetWindowLongPtrW( hwnd, GWL_STYLE );
HWND parent;
if (style & BS_PUSHLIKE)
@ -1069,7 +1069,7 @@ static void BUTTON_CheckAutoRadioButton( HWND hwnd )
{
if (!sibling) break;
if ((hwnd != sibling) &&
((GetWindowLongW( sibling, GWL_STYLE) & 0x0f) == BS_AUTORADIOBUTTON))
((GetWindowLongPtrW( sibling, GWL_STYLE) & 0x0f) == BS_AUTORADIOBUTTON))
SendMessageW( sibling, BM_SETCHECK, BUTTON_UNCHECKED, 0 );
sibling = GetNextDlgGroupItem( parent, sibling, FALSE );
} while (sibling != start);
@ -1087,7 +1087,7 @@ static void GB_Paint( HWND hwnd, HDC hDC, UINT action )
HFONT hFont;
UINT dtFlags;
TEXTMETRICW tm;
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
LONG style = GetWindowLongPtrW( hwnd, GWL_STYLE );
HWND parent;
if ((hFont = get_button_font( hwnd ))) SelectObject( hDC, hFont );

View file

@ -158,18 +158,18 @@ static LRESULT COMBO_NCCreate(HWND hwnd, LONG style)
/* some braindead apps do try to use scrollbar/border flags */
lphc->dwStyle = style & ~(WS_BORDER | WS_HSCROLL | WS_VSCROLL);
SetWindowLongW( hwnd, GWL_STYLE, style & ~(WS_BORDER | WS_HSCROLL | WS_VSCROLL) );
SetWindowLongPtrW( hwnd, GWL_STYLE, style & ~(WS_BORDER | WS_HSCROLL | WS_VSCROLL) );
/*
* We also have to remove the client edge style to make sure
* we don't end-up with a non client area.
*/
SetWindowLongW( hwnd, GWL_EXSTYLE,
GetWindowLongW( hwnd, GWL_EXSTYLE ) & ~WS_EX_CLIENTEDGE );
SetWindowLongPtrW( hwnd, GWL_EXSTYLE,
GetWindowLongPtrW( hwnd, GWL_EXSTYLE ) & ~WS_EX_CLIENTEDGE );
if( !(style & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) )
lphc->dwStyle |= CBS_HASSTRINGS;
if( !(GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_NOPARENTNOTIFY) )
if( !(GetWindowLongPtrW( hwnd, GWL_EXSTYLE ) & WS_EX_NOPARENTNOTIFY) )
lphc->wState |= CBF_NOTIFY;
TRACE("[%p], style = %08x\n", lphc, lphc->dwStyle );

View file

@ -771,12 +771,12 @@ static LRESULT EditWndProc_common( HWND hwnd, UINT msg,
#endif
case EM_SETREADONLY:
if (wParam) {
SetWindowLongW( hwnd, GWL_STYLE,
GetWindowLongW( hwnd, GWL_STYLE ) | ES_READONLY );
SetWindowLongPtrW( hwnd, GWL_STYLE,
GetWindowLongPtrW( hwnd, GWL_STYLE ) | ES_READONLY );
es->style |= ES_READONLY;
} else {
SetWindowLongW( hwnd, GWL_STYLE,
GetWindowLongW( hwnd, GWL_STYLE ) & ~ES_READONLY );
SetWindowLongPtrW( hwnd, GWL_STYLE,
GetWindowLongPtrW( hwnd, GWL_STYLE ) & ~ES_READONLY );
es->style &= ~ES_READONLY;
}
result = 1;
@ -3875,13 +3875,13 @@ static void EDIT_EM_SetPasswordChar(EDITSTATE *es, WCHAR c)
if (es->password_char == c)
return;
style = GetWindowLongW( es->hwndSelf, GWL_STYLE );
style = GetWindowLongPtrW( es->hwndSelf, GWL_STYLE );
es->password_char = c;
if (c) {
SetWindowLongW( es->hwndSelf, GWL_STYLE, style | ES_PASSWORD );
SetWindowLongPtrW( es->hwndSelf, GWL_STYLE, style | ES_PASSWORD );
es->style |= ES_PASSWORD;
} else {
SetWindowLongW( es->hwndSelf, GWL_STYLE, style & ~ES_PASSWORD );
SetWindowLongPtrW( es->hwndSelf, GWL_STYLE, style & ~ES_PASSWORD );
es->style &= ~ES_PASSWORD;
}
EDIT_UpdateText(es, NULL, TRUE);
@ -4513,7 +4513,7 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos)
case SB_THUMBPOSITION:
TRACE("SB_THUMBPOSITION %d\n", pos);
es->flags &= ~EF_HSCROLL_TRACK;
if(GetWindowLongW( es->hwndSelf, GWL_STYLE ) & WS_HSCROLL)
if(GetWindowLongPtrW( es->hwndSelf, GWL_STYLE ) & WS_HSCROLL)
dx = pos - es->x_offset;
else
{
@ -4546,7 +4546,7 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos)
#endif
{
LRESULT ret;
if(GetWindowLongW( es->hwndSelf, GWL_STYLE ) & WS_HSCROLL)
if(GetWindowLongPtrW( es->hwndSelf, GWL_STYLE ) & WS_HSCROLL)
ret = GetScrollPos(es->hwndSelf, SB_HORZ);
else
{
@ -5008,7 +5008,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode)
if (lpcs->dwExStyle & WS_EX_CLIENTEDGE)
es->style &= ~WS_BORDER;
else if (es->style & WS_BORDER)
SetWindowLongW(hwnd, GWL_STYLE, es->style & ~WS_BORDER);
SetWindowLongPtrW(hwnd, GWL_STYLE, es->style & ~WS_BORDER);
return TRUE;
}
@ -5475,7 +5475,7 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos)
#endif
{
LRESULT ret;
if(GetWindowLongW( es->hwndSelf, GWL_STYLE ) & WS_VSCROLL)
if(GetWindowLongPtrW( es->hwndSelf, GWL_STYLE ) & WS_VSCROLL)
ret = GetScrollPos(es->hwndSelf, SB_VERT);
else
{

View file

@ -59,7 +59,7 @@ HWND ICONTITLE_Create( HWND owner )
LONG style = WS_CLIPSIBLINGS;
if (!IsWindowEnabled(owner)) style |= WS_DISABLED;
if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
if( GetWindowLongPtrA( owner, GWL_STYLE ) & WS_CHILD )
hWnd = CreateWindowExA( 0, (LPCSTR)ICONTITLE_CLASS_ATOM, NULL,
style | WS_CHILD, 0, 0, 1, 1,
GetParent(owner), 0, instance, NULL );
@ -68,8 +68,8 @@ HWND ICONTITLE_Create( HWND owner )
style, 0, 0, 1, 1,
owner, 0, instance, NULL );
WIN_SetOwner( hWnd, owner ); /* MDI depends on this */
SetWindowLongW( hWnd, GWL_STYLE,
GetWindowLongW( hWnd, GWL_STYLE ) & ~(WS_CAPTION | WS_BORDER) );
SetWindowLongPtrW( hWnd, GWL_STYLE,
GetWindowLongPtrW( hWnd, GWL_STYLE ) & ~(WS_CAPTION | WS_BORDER) );
return hWnd;
}
#endif
@ -142,7 +142,7 @@ static BOOL ICONTITLE_Paint( HWND hwnd, HWND owner, HDC hDC, BOOL bActive )
}
else
{
if( GetWindowLongA( hwnd, GWL_STYLE ) & WS_CHILD )
if( GetWindowLongPtrA( hwnd, GWL_STYLE ) & WS_CHILD )
{
hBrush = (HBRUSH) GetClassLongPtrW(hwnd, GCLP_HBRBACKGROUND);
if( hBrush )
@ -222,7 +222,7 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
if (wParam) ICONTITLE_SetTitlePos( hWnd, owner );
return 0;
case WM_ERASEBKGND:
if( GetWindowLongW( owner, GWL_STYLE ) & WS_CHILD )
if( GetWindowLongPtrW( owner, GWL_STYLE ) & WS_CHILD )
lParam = SendMessageW( owner, WM_ISACTIVEICON, 0, 0 );
else
lParam = (owner == GetActiveWindow());

View file

@ -2159,7 +2159,7 @@ static LRESULT LISTBOX_HandleLButtonDown( LB_DESCR *descr, DWORD keys, INT x, IN
if (!descr->lphc)
{
if (GetWindowLongW( descr->self, GWL_EXSTYLE ) & WS_EX_DRAGDETECT)
if (GetWindowLongPtrW( descr->self, GWL_EXSTYLE ) & WS_EX_DRAGDETECT)
{
POINT pt;
@ -2236,7 +2236,7 @@ static LRESULT LISTBOX_HandleLButtonDownCombo( LB_DESCR *descr, UINT msg, DWORD
{
/* Check to see the NC is a scrollbar */
INT nHitTestType=0;
LONG style = GetWindowLongW( descr->self, GWL_STYLE );
LONG style = GetWindowLongPtrW( descr->self, GWL_STYLE );
/* Check Vertical scroll bar */
if (style & WS_VSCROLL)
{
@ -2557,7 +2557,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
GetClientRect( hwnd, &rect );
descr->self = hwnd;
descr->owner = GetParent( descr->self );
descr->style = GetWindowLongW( descr->self, GWL_STYLE );
descr->style = GetWindowLongPtrW( descr->self, GWL_STYLE );
descr->width = rect.right - rect.left;
descr->height = rect.bottom - rect.top;
descr->items = NULL;

View file

@ -336,7 +336,7 @@ IntDrawScrollBar(HWND Wnd, HDC DC, INT Bar)
break;
case SB_CTL:
Vertical = (GetWindowLongW(Wnd, GWL_STYLE) & SBS_VERT) != 0;
Vertical = (GetWindowLongPtrW(Wnd, GWL_STYLE) & SBS_VERT) != 0;
break;
default:
@ -498,7 +498,7 @@ IntScrollGetScrollBarRect(HWND Wnd, INT Bar, RECT *Rect,
ClientToScreen(Wnd, (LPPOINT) &ClientRect.right);
GetWindowRect(Wnd, &WindowRect);
}
Style = GetWindowLongW(Wnd, GWL_STYLE);
Style = GetWindowLongPtrW(Wnd, GWL_STYLE);
switch (Bar)
{
@ -520,7 +520,7 @@ IntScrollGetScrollBarRect(HWND Wnd, INT Bar, RECT *Rect,
break;
case SB_VERT:
ExStyle = GetWindowLongW(Wnd, GWL_EXSTYLE);
ExStyle = GetWindowLongPtrW(Wnd, GWL_EXSTYLE);
if (0 != (ExStyle & WS_EX_LEFTSCROLLBAR))
{
Rect->left = ClientRect.left - WindowRect.left - GetSystemMetrics(SM_CXVSCROLL);
@ -769,7 +769,7 @@ IntScrollHandleKbdEvent(
}
SendMessageW(GetParent(Wnd),
(0 != (GetWindowLongW(Wnd, GWL_STYLE ) & SBS_VERT) ?
(0 != (GetWindowLongPtrW(Wnd, GWL_STYLE ) & SBS_VERT) ?
WM_VSCROLL : WM_HSCROLL), wParam, (LPARAM) Wnd);
}
@ -810,7 +810,7 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
memcpy(NewInfo.rgstate, ScrollBarInfo.rgstate, (CCHILDREN_SCROLLBAR + 1) * sizeof(DWORD));
if (SB_CTL == SBType
&& 0 != (GetWindowLongW(Wnd, GWL_STYLE) & (SBS_SIZEGRIP | SBS_SIZEBOX)))
&& 0 != (GetWindowLongPtrW(Wnd, GWL_STYLE) & (SBS_SIZEGRIP | SBS_SIZEBOX)))
{
switch(Msg)
{
@ -850,7 +850,7 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
}
else
{
Vertical = (0 != (GetWindowLongW(Wnd, GWL_STYLE) & SBS_VERT));
Vertical = (0 != (GetWindowLongPtrW(Wnd, GWL_STYLE) & SBS_VERT));
}
WndOwner = (SB_CTL == SBType) ? GetParent(Wnd) : Wnd;
WndCtl = (SB_CTL == SBType) ? Wnd : NULL;
@ -866,7 +866,7 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
LastMousePos = LastClickPos;
TrackThumbPos = ScrollBarInfo.xyThumbTop;
PrevPt = Pt;
if (SB_CTL == SBType && 0 != (GetWindowLongW(Wnd, GWL_STYLE) & WS_TABSTOP))
if (SB_CTL == SBType && 0 != (GetWindowLongPtrW(Wnd, GWL_STYLE) & WS_TABSTOP))
{
SetFocus(Wnd);
}
@ -1376,11 +1376,11 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA
Dc = (0 != wParam ? (HDC) wParam : BeginPaint(Wnd, &Ps));
if (GetWindowLongW(Wnd, GWL_STYLE) & SBS_SIZEGRIP)
if (GetWindowLongPtrW(Wnd, GWL_STYLE) & SBS_SIZEGRIP)
{
IntScrollDrawSizeGrip(Wnd, Dc);
}
else if (0 != (GetWindowLongW(Wnd, GWL_STYLE) & SBS_SIZEBOX))
else if (0 != (GetWindowLongPtrW(Wnd, GWL_STYLE) & SBS_SIZEBOX))
{
RECT Rect;
GetClientRect(Wnd, &Rect);

View file

@ -108,7 +108,7 @@ const struct builtin_class_descr STATIC_builtin_class =
static __inline void set_ui_state( HWND hwnd, LONG flags )
{
SetWindowLongW( hwnd, UISTATE_GWL_OFFSET, flags );
SetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET, flags );
}
static __inline LONG get_ui_state( HWND hwnd )
@ -435,7 +435,7 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
LPARAM lParam, BOOL unicode )
{
LRESULT lResult = 0;
LONG full_style = GetWindowLongW( hwnd, GWL_STYLE );
LONG full_style = GetWindowLongPtrW( hwnd, GWL_STYLE );
LONG style = full_style & SS_TYPEMASK;
switch (uMsg)
@ -510,8 +510,8 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
LPCWSTR textW;
if (full_style & SS_SUNKEN)
SetWindowLongW( hwnd, GWL_EXSTYLE,
GetWindowLongW( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE );
SetWindowLongPtrW( hwnd, GWL_EXSTYLE,
GetWindowLongPtrW( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE );
if(unicode)
{

View file

@ -178,13 +178,13 @@ UserGetInsideRectNC(PWINDOW Wnd, RECT *rect)
VOID
DefWndSetRedraw(HWND hWnd, WPARAM wParam)
{
LONG Style = GetWindowLong(hWnd, GWL_STYLE);
LONG Style = GetWindowLongPtr(hWnd, GWL_STYLE);
/* Content can be redrawn after a change. */
if (wParam)
{
if (!(Style & WS_VISIBLE)) /* Not Visible */
{
SetWindowLong(hWnd, GWL_STYLE, WS_VISIBLE);
SetWindowLongPtr(hWnd, GWL_STYLE, WS_VISIBLE);
}
}
else /* Content cannot be redrawn after a change. */
@ -193,7 +193,7 @@ DefWndSetRedraw(HWND hWnd, WPARAM wParam)
{
RedrawWindow( hWnd, NULL, 0, RDW_ALLCHILDREN | RDW_VALIDATE );
Style &= ~WS_VISIBLE;
SetWindowLong(hWnd, GWL_STYLE, Style); /* clear bits */
SetWindowLongPtr(hWnd, GWL_STYLE, Style); /* clear bits */
}
}
return;
@ -266,7 +266,7 @@ DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam, ULONG Style)
case HTBOTTOMLEFT:
case HTTOPRIGHT:
{
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_MAXIMIZE)
if (GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_MAXIMIZE)
{
break;
}
@ -840,7 +840,7 @@ LRESULT
DefWndHandleWindowPosChanging(HWND hWnd, WINDOWPOS* Pos)
{
POINT maxTrack, minTrack;
LONG style = GetWindowLongA(hWnd, GWL_STYLE);
LONG style = GetWindowLongPtrA(hWnd, GWL_STYLE);
if (Pos->flags & SWP_NOSIZE) return 0;
if ((style & WS_THICKFRAME) || ((style & (WS_POPUP | WS_CHILD)) == 0))
@ -872,7 +872,7 @@ DefWndHandleWindowPosChanged(HWND hWnd, WINDOWPOS* Pos)
RECT Rect;
GetClientRect(hWnd, &Rect);
MapWindowPoints(hWnd, (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD ?
MapWindowPoints(hWnd, (GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CHILD ?
GetParent(hWnd) : NULL), (LPPOINT) &Rect, 2);
if (! (Pos->flags & SWP_NOCLIENTMOVE))
@ -1145,7 +1145,7 @@ User32DefWindowProc(HWND hWnd,
case WM_CONTEXTMENU:
{
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
if (GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CHILD)
{
if (bUnicode)
{
@ -1162,7 +1162,7 @@ User32DefWindowProc(HWND hWnd,
DWORD Style;
LONG HitCode;
Style = GetWindowLongW(hWnd, GWL_STYLE);
Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
Pt.x = GET_X_LPARAM(lParam);
Pt.y = GET_Y_LPARAM(lParam);
@ -1180,7 +1180,7 @@ User32DefWindowProc(HWND hWnd,
if((SystemMenu = GetSystemMenu(hWnd, FALSE)))
{
MenuInitSysMenuPopup(SystemMenu, GetWindowLongW(hWnd, GWL_STYLE),
MenuInitSysMenuPopup(SystemMenu, GetWindowLongPtrW(hWnd, GWL_STYLE),
GetClassLongPtrW(hWnd, GCL_STYLE), HitCode);
if(HitCode == HTCAPTION)
@ -1223,7 +1223,7 @@ User32DefWindowProc(HWND hWnd,
{
HICON hIcon;
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE &&
if (GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_MINIMIZE &&
(hIcon = (HICON)GetClassLongPtrW(hWnd, GCL_HICON)) != NULL)
{
RECT ClientRect;
@ -1268,7 +1268,7 @@ User32DefWindowProc(HWND hWnd,
case WM_MOUSEACTIVATE:
{
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
if (GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CHILD)
{
LONG Ret;
if (bUnicode)
@ -1293,7 +1293,7 @@ User32DefWindowProc(HWND hWnd,
{
/* Check if the window is minimized. */
if (LOWORD(wParam) != WA_INACTIVE &&
!(GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE))
!(GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_MINIMIZE))
{
SetFocus(hWnd);
}
@ -1302,7 +1302,7 @@ User32DefWindowProc(HWND hWnd,
case WM_MOUSEWHEEL:
{
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
if (GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CHILD)
{
if (bUnicode)
{
@ -1356,7 +1356,7 @@ User32DefWindowProc(HWND hWnd,
case WM_SETCURSOR:
{
ULONG Style = GetWindowLongW(hWnd, GWL_STYLE);
ULONG Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
if (Style & WS_CHILD)
{
@ -1457,7 +1457,7 @@ User32DefWindowProc(HWND hWnd,
if ((HIWORD(lParam) & KEYDATA_ALT) && wParam)
{
if (wParam == '\t' || wParam == '\x1b') break;
if (wParam == ' ' && (GetWindowLongW( hWnd, GWL_STYLE ) & WS_CHILD))
if (wParam == ' ' && (GetWindowLongPtrW( hWnd, GWL_STYLE ) & WS_CHILD))
SendMessageW( GetParent(hWnd), Msg, wParam, lParam );
else
SendMessageW( hWnd, WM_SYSCOMMAND, SC_KEYMENU, wParam );
@ -1478,7 +1478,7 @@ User32DefWindowProc(HWND hWnd,
{
iMenuSysKey = 0;
/* FIXME: Check for a desktop. */
if (!(GetWindowLongW( hWnd, GWL_STYLE ) & WS_CHILD)) EndMenu();
if (!(GetWindowLongPtrW( hWnd, GWL_STYLE ) & WS_CHILD)) EndMenu();
if (GetCapture() == hWnd)
{
ReleaseCapture();
@ -1495,7 +1495,7 @@ User32DefWindowProc(HWND hWnd,
*/
case WM_QUERYDROPOBJECT:
{
if (GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_ACCEPTFILES)
if (GetWindowLongPtrW(hWnd, GWL_EXSTYLE) & WS_EX_ACCEPTFILES)
{
return(1);
}
@ -1953,7 +1953,7 @@ DefWindowProcA(HWND hWnd,
{
DefSetText(hWnd, (PCWSTR)lParam, TRUE);
if ((GetWindowLongW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
if ((GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
{
DefWndNCPaint(hWnd, (HRGN)1, -1);
}
@ -2095,7 +2095,7 @@ DefWindowProcW(HWND hWnd,
{
DefSetText(hWnd, (PCWSTR)lParam, FALSE);
if ((GetWindowLongW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
if ((GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
{
DefWndNCPaint(hWnd, (HRGN)1, -1);
}

View file

@ -450,7 +450,7 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM wParam )
do
{
DWORD style = GetWindowLongW( hwndControl, GWL_STYLE );
DWORD style = GetWindowLongPtrW( hwndControl, GWL_STYLE );
if ((style & (WS_VISIBLE | WS_DISABLED)) == WS_VISIBLE)
{
dlgCode = SendMessageA( hwndControl, WM_GETDLGCODE, 0, 0 );
@ -539,7 +539,7 @@ INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
ShowWindow( hwnd, SW_SHOWNORMAL );
bFirstEmpty = FALSE;
}
if (!(GetWindowLongW( hwnd, GWL_STYLE ) & DS_NOIDLEMSG))
if (!(GetWindowLongPtrW( hwnd, GWL_STYLE ) & DS_NOIDLEMSG))
{
/* No message present -> send ENTERIDLE and wait */
SendMessageW( ownerMsg, WM_ENTERIDLE, MSGF_DIALOGBOX, (LPARAM)hwnd );
@ -875,10 +875,10 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
SetFocus( dlgInfo->hwndFocus );
}
}
if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD))
if (!(GetWindowLongPtrW( hwnd, GWL_STYLE ) & WS_CHILD))
SendMessageW( hwnd, WM_CHANGEUISTATE, MAKEWPARAM(UIS_INITIALIZE, 0), 0);
if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
if (template.style & WS_VISIBLE && !(GetWindowLongPtrW( hwnd, GWL_STYLE ) & WS_VISIBLE))
{
ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
}
@ -962,9 +962,9 @@ static HWND DEFDLG_FindDefButton( HWND hwndDlg )
break;
/* Recurse into WS_EX_CONTROLPARENT controls */
if (GetWindowLongW( hwndChild, GWL_EXSTYLE ) & WS_EX_CONTROLPARENT)
if (GetWindowLongPtrW( hwndChild, GWL_EXSTYLE ) & WS_EX_CONTROLPARENT)
{
LONG dsStyle = GetWindowLongW( hwndChild, GWL_STYLE );
LONG dsStyle = GetWindowLongPtrW( hwndChild, GWL_STYLE );
if ((dsStyle & WS_VISIBLE) && !(dsStyle & WS_DISABLED) &&
(hwndTmp = DEFDLG_FindDefButton(hwndChild)) != NULL)
return hwndTmp;
@ -1198,8 +1198,8 @@ static HWND DIALOG_GetNextTabItem( HWND hwndMain, HWND hwndDlg, HWND hwndCtrl, B
while(hChildFirst)
{
dsStyle = GetWindowLongA(hChildFirst,GWL_STYLE);
exStyle = GetWindowLongA(hChildFirst,GWL_EXSTYLE);
dsStyle = GetWindowLongPtrA(hChildFirst,GWL_STYLE);
exStyle = GetWindowLongPtrA(hChildFirst,GWL_EXSTYLE);
if( (exStyle & WS_EX_CONTROLPARENT) && (dsStyle & WS_VISIBLE) && !(dsStyle & WS_DISABLED))
{
HWND retWnd;
@ -1411,7 +1411,7 @@ static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPWSTR str, INT len,
BOOL CALLBACK GetDlgItemEnumProc (HWND hwnd, LPARAM lParam )
{
GETDLGITEMINFO * info = (GETDLGITEMINFO *)lParam;
if(info->nIDDlgItem == GetWindowLongW( hwnd, GWL_ID ))
if(info->nIDDlgItem == GetWindowLongPtrW( hwnd, GWL_ID ))
{
info->control = hwnd;
return FALSE;
@ -2092,7 +2092,7 @@ GetNextDlgGroupItem(
/* MSDN is wrong. fPrevious does not result in the last child */
/* Maybe that first one is valid. If so then we don't want to skip it*/
if ((GetWindowLongW( hCtl, GWL_STYLE ) & (WS_VISIBLE|WS_DISABLED)) == WS_VISIBLE)
if ((GetWindowLongPtrW( hCtl, GWL_STYLE ) & (WS_VISIBLE|WS_DISABLED)) == WS_VISIBLE)
{
return hCtl;
}
@ -2130,8 +2130,8 @@ GetNextDlgGroupItem(
hwnd = hwndNext;
/* Wander down the leading edge of controlparents */
while ( (GetWindowLongW (hwnd, GWL_EXSTYLE) & WS_EX_CONTROLPARENT) &&
((GetWindowLongW (hwnd, GWL_STYLE) & (WS_VISIBLE | WS_DISABLED)) == WS_VISIBLE) &&
while ( (GetWindowLongPtrW (hwnd, GWL_EXSTYLE) & WS_EX_CONTROLPARENT) &&
((GetWindowLongPtrW (hwnd, GWL_STYLE) & (WS_VISIBLE | WS_DISABLED)) == WS_VISIBLE) &&
(hwndNext = GetWindow (hwnd, GW_CHILD)))
hwnd = hwndNext;
/* Question. If the control is a control parent but either has no
@ -2140,7 +2140,7 @@ GetNextDlgGroupItem(
* I believe it doesn't count.
*/
if ((GetWindowLongW (hwnd, GWL_STYLE) & WS_GROUP))
if ((GetWindowLongPtrW (hwnd, GWL_STYLE) & WS_GROUP))
{
hwndLastGroup = hwnd;
if (!fSkipping)
@ -2160,7 +2160,7 @@ GetNextDlgGroupItem(
}
if (!fSkipping &&
(GetWindowLongW (hwnd, GWL_STYLE) & (WS_VISIBLE|WS_DISABLED)) ==
(GetWindowLongPtrW (hwnd, GWL_STYLE) & (WS_VISIBLE|WS_DISABLED)) ==
WS_VISIBLE)
{
retvalue = hwnd;

View file

@ -110,7 +110,7 @@ BOOL WINAPI
EnableWindow(HWND hWnd,
BOOL bEnable)
{
LONG Style = GetWindowLongW(hWnd, GWL_STYLE);
LONG Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
/* check if updating is needed */
UINT bIsDisabled = (Style & WS_DISABLED);
if ( (bIsDisabled && bEnable) || (!bIsDisabled && !bEnable) )

View file

@ -272,7 +272,7 @@ static HWND MDI_GetWindow(MDICLIENTINFO *clientInfo, HWND hWnd, BOOL bNext,
for ( ; list[i]; i++)
{
if (GetWindow( list[i], GW_OWNER )) continue;
if ((GetWindowLongW( list[i], GWL_STYLE ) & dwStyleMask) != WS_VISIBLE) continue;
if ((GetWindowLongPtrW( list[i], GWL_STYLE ) & dwStyleMask) != WS_VISIBLE) continue;
last = list[i];
if (bNext) goto found;
}
@ -280,7 +280,7 @@ static HWND MDI_GetWindow(MDICLIENTINFO *clientInfo, HWND hWnd, BOOL bNext,
for (i = 0; list[i] && list[i] != hWnd; i++)
{
if (GetWindow( list[i], GW_OWNER )) continue;
if ((GetWindowLongW( list[i], GWL_STYLE ) & dwStyleMask) != WS_VISIBLE) continue;
if ((GetWindowLongPtrW( list[i], GWL_STYLE ) & dwStyleMask) != WS_VISIBLE) continue;
last = list[i];
if (bNext) goto found;
}
@ -382,7 +382,7 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
HMENU oldFrameMenu = ci->hFrameMenu;
ci->hFrameMenu = hmenuFrame;
if (IsZoomed(ci->hwndActiveChild) && (GetWindowLongW(ci->hwndActiveChild, GWL_STYLE) & WS_VISIBLE))
if (IsZoomed(ci->hwndActiveChild) && (GetWindowLongPtrW(ci->hwndActiveChild, GWL_STYLE) & WS_VISIBLE))
MDI_AugmentFrameMenu( hwndFrame, ci->hwndActiveChild );
return (LRESULT)oldFrameMenu;
@ -460,7 +460,7 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
visible = 0;
for (i = 0; i < ci->nActiveChildren; i++)
{
if (GetWindowLongW(ci->child[i], GWL_STYLE) & WS_VISIBLE)
if (GetWindowLongPtrW(ci->child[i], GWL_STYLE) & WS_VISIBLE)
{
id = ci->idFirstChild + visible;
@ -510,8 +510,8 @@ static void MDI_ChildGetMinMaxInfo( HWND client, HWND hwnd, MINMAXINFO* lpMinMax
RECT rect;
GetClientRect( client, &rect );
AdjustWindowRectEx( &rect, GetWindowLongW( hwnd, GWL_STYLE ),
0, GetWindowLongW( hwnd, GWL_EXSTYLE ));
AdjustWindowRectEx( &rect, GetWindowLongPtrW( hwnd, GWL_STYLE ),
0, GetWindowLongPtrW( hwnd, GWL_EXSTYLE ));
lpMinMax->ptMaxSize.x = rect.right -= rect.left;
lpMinMax->ptMaxSize.y = rect.bottom -= rect.top;
@ -1249,7 +1249,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
switch (LOWORD(wParam))
{
case WM_CREATE:
if (GetWindowLongW((HWND)lParam, GWL_EXSTYLE) & WS_EX_MDICHILD)
if (GetWindowLongPtrW((HWND)lParam, GWL_EXSTYLE) & WS_EX_MDICHILD)
{
if (!ci->child)
ci->child = HeapAlloc(GetProcessHeap(), 0, sizeof(HWND));
@ -1284,7 +1284,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
case WM_SIZE:
if( IsWindow(ci->hwndActiveChild) && IsZoomed(ci->hwndActiveChild) &&
(GetWindowLongW(ci->hwndActiveChild, GWL_STYLE) & WS_VISIBLE) )
(GetWindowLongPtrW(ci->hwndActiveChild, GWL_STYLE) & WS_VISIBLE) )
{
RECT rect;
@ -1293,8 +1293,8 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
rect.right = LOWORD(lParam);
rect.bottom = HIWORD(lParam);
AdjustWindowRectEx(&rect, GetWindowLongA(ci->hwndActiveChild, GWL_STYLE),
0, GetWindowLongA(ci->hwndActiveChild, GWL_EXSTYLE) );
AdjustWindowRectEx(&rect, GetWindowLongPtrA(ci->hwndActiveChild, GWL_STYLE),
0, GetWindowLongPtrA(ci->hwndActiveChild, GWL_EXSTYLE) );
MoveWindow(ci->hwndActiveChild, rect.left, rect.top,
rect.right - rect.left, rect.bottom - rect.top, 1);
}
@ -1755,7 +1755,7 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
int i;
for (i = 0; list[i]; i++)
{
DWORD style = GetWindowLongW( list[i], GWL_STYLE );
DWORD style = GetWindowLongPtrW( list[i], GWL_STYLE );
if (style & WS_MAXIMIZE)
{
HeapFree( GetProcessHeap(), 0, list );

View file

@ -2215,7 +2215,7 @@ MenuShowSubPopup(HWND WndOwner, PROSMENUINFO MenuInfo, BOOL SelectFirst, UINT Fl
if (IS_SYSTEM_MENU(MenuInfo))
{
MenuInitSysMenuPopup(ItemInfo.hSubMenu, GetWindowLongW(MenuInfo->Wnd, GWL_STYLE),
MenuInitSysMenuPopup(ItemInfo.hSubMenu, GetWindowLongPtrW(MenuInfo->Wnd, GWL_STYLE),
GetClassLongPtrW(MenuInfo->Wnd, GCL_STYLE), HTSYSMENU);
NcGetSysPopupPos(MenuInfo->Wnd, &Rect);
@ -2773,7 +2773,7 @@ MenuDoNextMenu(MTRACKER* Mt, UINT Vk)
if (NULL == NextMenu.hmenuNext || NULL == NextMenu.hwndNext)
{
DWORD Style = GetWindowLongW(Mt->OwnerWnd, GWL_STYLE);
DWORD Style = GetWindowLongPtrW(Mt->OwnerWnd, GWL_STYLE);
NewWnd = Mt->OwnerWnd;
if (IS_SYSTEM_MENU(&TopMenuInfo))
{
@ -2811,7 +2811,7 @@ MenuDoNextMenu(MTRACKER* Mt, UINT Vk)
if (IsMenu(NewMenu) && IsWindow(NewWnd))
{
DWORD Style = GetWindowLongW(NewWnd, GWL_STYLE);
DWORD Style = GetWindowLongPtrW(NewWnd, GWL_STYLE);
if (0 != (Style & WS_SYSMENU)
&& GetSystemMenu(NewWnd, FALSE) == NewMenu)
@ -3585,7 +3585,7 @@ MenuTrackKbdMenuBar(HWND hWnd, UINT wParam, WCHAR wChar)
/* find window that has a menu */
while (!((GetWindowLongW( hWnd, GWL_STYLE ) &
while (!((GetWindowLongPtrW( hWnd, GWL_STYLE ) &
(WS_CHILD | WS_POPUP)) != WS_CHILD))
if (!(hWnd = GetAncestor( hWnd, GA_PARENT ))) return;
@ -3594,7 +3594,7 @@ MenuTrackKbdMenuBar(HWND hWnd, UINT wParam, WCHAR wChar)
hTrackMenu = GetMenu( hWnd );
if (!hTrackMenu || IsIconic(hWnd) || wChar == ' ' )
{
if (!(GetWindowLongW( hWnd, GWL_STYLE ) & WS_SYSMENU)) return;
if (!(GetWindowLongPtrW( hWnd, GWL_STYLE ) & WS_SYSMENU)) return;
hTrackMenu = NtUserGetSystemMenu(hWnd, FALSE);
uItem = 0;
wParam |= HTSYSMENU; /* prevent item lookup */

View file

@ -428,7 +428,7 @@ MsgiAnsiToUnicodeMessage(LPMSG UnicodeMsg, LPMSG AnsiMsg)
case LB_FINDSTRINGEXACT:
case LB_SELECTSTRING:
{
DWORD dwStyle = GetWindowLongW(AnsiMsg->hwnd, GWL_STYLE);
DWORD dwStyle = GetWindowLongPtrW(AnsiMsg->hwnd, GWL_STYLE);
if (!(dwStyle & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE)) &&
(dwStyle & LBS_HASSTRINGS))
{
@ -443,7 +443,7 @@ MsgiAnsiToUnicodeMessage(LPMSG UnicodeMsg, LPMSG AnsiMsg)
case CB_FINDSTRINGEXACT:
case CB_SELECTSTRING:
{
DWORD dwStyle = GetWindowLongW(AnsiMsg->hwnd, GWL_STYLE);
DWORD dwStyle = GetWindowLongPtrW(AnsiMsg->hwnd, GWL_STYLE);
if (!(dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) &&
(dwStyle & CBS_HASSTRINGS))
{
@ -550,7 +550,7 @@ MsgiAnsiToUnicodeCleanup(LPMSG UnicodeMsg, LPMSG AnsiMsg)
case LB_FINDSTRINGEXACT:
case LB_SELECTSTRING:
{
DWORD dwStyle = GetWindowLongW(AnsiMsg->hwnd, GWL_STYLE);
DWORD dwStyle = GetWindowLongPtrW(AnsiMsg->hwnd, GWL_STYLE);
if (!(dwStyle & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE)) &&
(dwStyle & LBS_HASSTRINGS))
{
@ -565,7 +565,7 @@ MsgiAnsiToUnicodeCleanup(LPMSG UnicodeMsg, LPMSG AnsiMsg)
case CB_FINDSTRINGEXACT:
case CB_SELECTSTRING:
{
DWORD dwStyle = GetWindowLongW(AnsiMsg->hwnd, GWL_STYLE);
DWORD dwStyle = GetWindowLongPtrW(AnsiMsg->hwnd, GWL_STYLE);
if (!(dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) &&
(dwStyle & CBS_HASSTRINGS))
{
@ -726,7 +726,7 @@ MsgiUnicodeToAnsiMessage(LPMSG AnsiMsg, LPMSG UnicodeMsg)
case LB_FINDSTRINGEXACT:
case LB_SELECTSTRING:
{
DWORD dwStyle = GetWindowLongW(AnsiMsg->hwnd, GWL_STYLE);
DWORD dwStyle = GetWindowLongPtrW(AnsiMsg->hwnd, GWL_STYLE);
if (!(dwStyle & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE)) &&
(dwStyle & LBS_HASSTRINGS))
{
@ -741,7 +741,7 @@ MsgiUnicodeToAnsiMessage(LPMSG AnsiMsg, LPMSG UnicodeMsg)
case CB_FINDSTRINGEXACT:
case CB_SELECTSTRING:
{
DWORD dwStyle = GetWindowLongW(AnsiMsg->hwnd, GWL_STYLE);
DWORD dwStyle = GetWindowLongPtrW(AnsiMsg->hwnd, GWL_STYLE);
if (!(dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) &&
(dwStyle & CBS_HASSTRINGS))
{
@ -852,7 +852,7 @@ MsgiUnicodeToAnsiCleanup(LPMSG AnsiMsg, LPMSG UnicodeMsg)
case LB_FINDSTRINGEXACT:
case LB_SELECTSTRING:
{
DWORD dwStyle = GetWindowLongW(AnsiMsg->hwnd, GWL_STYLE);
DWORD dwStyle = GetWindowLongPtrW(AnsiMsg->hwnd, GWL_STYLE);
if (!(dwStyle & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE)) &&
(dwStyle & LBS_HASSTRINGS))
{
@ -867,7 +867,7 @@ MsgiUnicodeToAnsiCleanup(LPMSG AnsiMsg, LPMSG UnicodeMsg)
case CB_FINDSTRINGEXACT:
case CB_SELECTSTRING:
{
DWORD dwStyle = GetWindowLongW(AnsiMsg->hwnd, GWL_STYLE);
DWORD dwStyle = GetWindowLongPtrW(AnsiMsg->hwnd, GWL_STYLE);
if (!(dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) &&
(dwStyle & CBS_HASSTRINGS))
{

View file

@ -251,8 +251,8 @@ UserDrawCaptionButtonWnd(HWND hWnd, HDC hDC, BOOL bDown, ULONG Type)
WindowRect.right -= WindowRect.left;
WindowRect.bottom -= WindowRect.top;
WindowRect.left = WindowRect.top = 0;
Style = GetWindowLongW(hWnd, GWL_STYLE);
ExStyle = GetWindowLongW(hWnd, GWL_EXSTYLE);
Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
ExStyle = GetWindowLongPtrW(hWnd, GWL_EXSTYLE);
UserGetWindowBorders(Style, ExStyle, &WindowBorder, FALSE);
InflateRect(&WindowRect, -WindowBorder.cx, -WindowBorder.cy);
UserDrawCaptionButton(&WindowRect, Style, ExStyle, hDC, bDown, Type);
@ -281,7 +281,7 @@ DefWndNCPaint(HWND hWnd, HRGN hRgn, BOOL Active)
if (!IsWindowVisible(hWnd))
return 0;
Style = GetWindowLongW(hWnd, GWL_STYLE);
Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
hDC = GetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | DCX_USESTYLE | DCX_KEEPCLIPRGN);
if (hDC == 0)
@ -290,7 +290,7 @@ DefWndNCPaint(HWND hWnd, HRGN hRgn, BOOL Active)
}
Parent = GetParent(hWnd);
ExStyle = GetWindowLongW(hWnd, GWL_EXSTYLE);
ExStyle = GetWindowLongPtrW(hWnd, GWL_EXSTYLE);
if (Active == -1)
{
if (ExStyle & WS_EX_MDICHILD)
@ -474,7 +474,7 @@ DefWndNCPaint(HWND hWnd, HRGN hRgn, BOOL Active)
/* FIXME: Correct drawing of size-box with WS_EX_LEFTSCROLLBAR */
if(Parent)
GetClientRect(Parent, &ParentClientRect);
if (HASSIZEGRIP(Style, ExStyle, GetWindowLongW(Parent, GWL_STYLE), WindowRect, ParentClientRect))
if (HASSIZEGRIP(Style, ExStyle, GetWindowLongPtrW(Parent, GWL_STYLE), WindowRect, ParentClientRect))
{
DrawFrameControl(hDC, &TempRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
}
@ -523,8 +523,8 @@ DefWndNCCalcSize(HWND hWnd, BOOL CalcSizeStruct, RECT *Rect)
Result |= WVR_VALIDRECTS;
}
Style = GetWindowLongW(hWnd, GWL_STYLE);
ExStyle = GetWindowLongW(hWnd, GWL_EXSTYLE);
Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
ExStyle = GetWindowLongPtrW(hWnd, GWL_EXSTYLE);
if (!(Style & WS_MINIMIZE))
{
@ -665,8 +665,8 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
RECT WindowRect, ClientRect, OrigWndRect;
POINT ClientPoint;
SIZE WindowBorders;
ULONG Style = GetWindowLongW(hWnd, GWL_STYLE);
ULONG ExStyle = GetWindowLongW(hWnd, GWL_EXSTYLE);
ULONG Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
ULONG ExStyle = GetWindowLongPtrW(hWnd, GWL_EXSTYLE);
GetWindowRect(hWnd, &WindowRect);
if (!PtInRect(&WindowRect, Point))
@ -837,7 +837,7 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
if(Parent)
GetClientRect(Parent, &ParentRect);
if (PtInRect(&TempRect, Point) && HASSIZEGRIP(Style, ExStyle,
GetWindowLongW(Parent, GWL_STYLE), OrigWndRect, ParentRect))
GetWindowLongPtrW(Parent, GWL_STYLE), OrigWndRect, ParentRect))
{
if ((ExStyle & WS_EX_LEFTSCROLLBAR) != 0)
return HTBOTTOMLEFT;
@ -880,7 +880,7 @@ DefWndDoButton(HWND hWnd, WPARAM wParam)
WPARAM SCMsg;
ULONG ButtonType, Style;
Style = GetWindowLongW(hWnd, GWL_STYLE);
Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
switch (wParam)
{
case HTCLOSE:
@ -962,7 +962,7 @@ DefWndNCLButtonDown(HWND hWnd, WPARAM wParam, LPARAM lParam)
}
case HTSYSMENU:
{
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_SYSMENU)
if (GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_SYSMENU)
{
SendMessageW(hWnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU,
lParam);
@ -1013,7 +1013,7 @@ DefWndNCLButtonDblClk(HWND hWnd, WPARAM wParam, LPARAM lParam)
{
ULONG Style;
Style = GetWindowLongW(hWnd, GWL_STYLE);
Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
switch(wParam)
{
case HTCAPTION:
@ -1185,14 +1185,14 @@ NcGetInsideRect(HWND Wnd, RECT *Rect)
Rect->bottom = Rect->bottom - Rect->top;
Rect->top = 0;
Style = GetWindowLongW(Wnd, GWL_STYLE);
Style = GetWindowLongPtrW(Wnd, GWL_STYLE);
if (0 != (Style & WS_ICONIC))
{
return;
}
/* Remove frame from rectangle */
ExStyle = GetWindowLongW(Wnd, GWL_EXSTYLE);
ExStyle = GetWindowLongPtrW(Wnd, GWL_EXSTYLE);
if (HAS_THICKFRAME(Style, ExStyle))
{
InflateRect(Rect, - GetSystemMetrics(SM_CXFRAME), - GetSystemMetrics(SM_CYFRAME));
@ -1239,7 +1239,7 @@ NcGetSysPopupPos(HWND Wnd, RECT *Rect)
NcGetInsideRect(Wnd, Rect);
GetWindowRect(Wnd, &WindowRect);
OffsetRect(Rect, WindowRect.left, WindowRect.top);
if (0 != (GetWindowLongW(Wnd, GWL_STYLE) & WS_CHILD))
if (0 != (GetWindowLongPtrW(Wnd, GWL_STYLE) & WS_CHILD))
{
ClientToScreen(GetParent(Wnd), (POINT *) Rect);
}

View file

@ -302,7 +302,7 @@ CreateWindowExA(DWORD dwExStyle,
lpParam = (LPVOID)&mdi;
if (GetWindowLongW(hWndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES)
if (GetWindowLongPtrW(hWndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES)
{
if (dwStyle & WS_POPUP)
{
@ -408,7 +408,7 @@ CreateWindowExW(DWORD dwExStyle,
lpParam = (LPVOID)&mdi;
if (GetWindowLongW(hWndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES)
if (GetWindowLongPtrW(hWndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES)
{
if (dwStyle & WS_POPUP)
{
@ -1433,7 +1433,7 @@ IsWindowEnabled(HWND hWnd)
// disabled. I think they stop processing messages but stay appearing
// as enabled.
return !(GetWindowLongW(hWnd, GWL_STYLE) & WS_DISABLED);
return !(GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_DISABLED);
}
@ -1443,7 +1443,7 @@ IsWindowEnabled(HWND hWnd)
BOOL WINAPI
IsZoomed(HWND hWnd)
{
return (GetWindowLongW(hWnd, GWL_STYLE) & WS_MAXIMIZE) != 0;
return (GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_MAXIMIZE) != 0;
}
@ -1494,7 +1494,7 @@ AnimateWindow(HWND hwnd,
BOOL WINAPI
OpenIcon(HWND hWnd)
{
if (!(GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE))
if (!(GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_MINIMIZE))
return FALSE;
ShowWindow(hWnd,SW_RESTORE);
@ -1555,7 +1555,7 @@ SetWindowTextA(HWND hWnd,
DefSetText(hWnd, (PCWSTR)lpString, TRUE);
if ((GetWindowLongW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
if ((GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
{
DefWndNCPaint(hWnd, (HRGN)1, -1);
}
@ -1585,7 +1585,7 @@ SetWindowTextW(HWND hWnd,
DefSetText(hWnd, lpString, FALSE);
if ((GetWindowLongW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
if ((GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
{
DefWndNCPaint(hWnd, (HRGN)1, -1);
}

View file

@ -28,7 +28,7 @@ static BOOL can_activate_window( HWND hwnd )
LONG style;
if (!hwnd) return FALSE;
style = GetWindowLongW( hwnd, GWL_STYLE );
style = GetWindowLongPtrW( hwnd, GWL_STYLE );
if (!(style & WS_VISIBLE)) return FALSE;
if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE;
return !(style & WS_DISABLED);
@ -46,7 +46,7 @@ WinPosActivateOtherWindow(HWND hwnd)
{
HWND hwndTo, fg;
if ((GetWindowLongW( hwnd, GWL_STYLE ) & WS_POPUP) && (hwndTo = GetWindow( hwnd, GW_OWNER )))
if ((GetWindowLongPtrW( hwnd, GWL_STYLE ) & WS_POPUP) && (hwndTo = GetWindow( hwnd, GW_OWNER )))
{
hwndTo = GetAncestor( hwndTo, GA_ROOT );
if (can_activate_window( hwndTo )) goto done;