From MSDN "If you are retrieving a pointer or a handle, this function supersedes the GetWindowLong function. To write code that is compatible with both 32-bit and 64-bit versions of Windows, use Get/SetWindowLongPtr."

svn path=/branches/ros-amd64-bringup/; revision=38335
This commit is contained in:
Samuel Serapion
2008-12-24 22:05:17 +00:00
parent e47dc393c2
commit eb32a3cd15

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_PTR)pIconContext);
pIconContext->hDlgCtrl = GetDlgItem(hwndDlg, IDC_PICKICON_LIST);
EnumResourceNamesW(pIconContext->hLibrary, RT_ICON, EnumPickIconResourceProc, (LPARAM)pIconContext);
if (PathUnExpandEnvStringsW(pIconContext->szName, szText, MAX_PATH))