Changeset 9370 for trunk/src/comctl32/propsheet.c
- Timestamp:
- Oct 29, 2002, 1:19:36 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/propsheet.c
r8515 r9370 25 25 26 26 #include <string.h> 27 27 28 #include "winbase.h" 28 29 #include "commctrl.h" … … 30 31 #include "winnls.h" 31 32 #include "comctl32.h" 33 #include "heap.h" 34 32 35 #include "wine/debug.h" 33 #include "heap.h" 34 36 #include "wine/unicode.h" 35 37 36 38 /****************************************************************************** 37 39 * Data structures 38 40 */ 41 #include "pshpack2.h" 42 39 43 typedef struct 40 44 { … … 45 49 DWORD style; 46 50 } MyDLGTEMPLATEEX; 51 52 typedef struct 53 { 54 DWORD helpid; 55 DWORD exStyle; 56 DWORD style; 57 short x; 58 short y; 59 short cy; 60 DWORD id; 61 } MyDLGITEMTEMPLATEEX; 62 #include "poppack.h" 47 63 48 64 typedef struct tagPropPageInfo … … 89 105 */ 90 106 91 const WCHAR PropSheetInfoStr[] = 107 const WCHAR PropSheetInfoStr[] = 92 108 {'P','r','o','p','e','r','t','y','S','h','e','e','t','I','n','f','o',0 }; 93 109 … … 139 155 int skipdir, 140 156 HPROPSHEETPAGE hpage); 157 static void PROPSHEET_SetCurSelId(HWND hwndDlg, int id); 141 158 static LRESULT PROPSHEET_QuerySiblings(HWND hwndDlg, 142 159 WPARAM wParam, LPARAM lParam); … … 210 227 211 228 /****************************************************************************** 229 * PROPSHEET_GetPageRect 230 * 231 * Retrieve rect from tab control and map into the dialog for SetWindowPos 232 */ 233 static void PROPSHEET_GetPageRect(const PropSheetInfo * psInfo, HWND hwndDlg, RECT *rc) 234 { 235 HWND hwndTabCtrl = GetDlgItem(hwndDlg, IDC_TABCONTROL); 236 237 GetClientRect(hwndTabCtrl, rc); 238 SendMessageW(hwndTabCtrl, TCM_ADJUSTRECT, FALSE, (LPARAM)rc); 239 MapWindowPoints(hwndTabCtrl, hwndDlg, (LPPOINT)rc, 2); 240 } 241 242 /****************************************************************************** 212 243 * PROPSHEET_FindPageByResId 213 244 * … … 262 293 263 294 memcpy(&psInfo->ppshheader,lppsh,dwSize); 264 TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%ld\ndwFlags\t\t%08lx\nhwndParent\t% 04x\nhInstance\t%08x\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n",295 TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%ld\ndwFlags\t\t%08lx\nhwndParent\t%p\nhInstance\t%p\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n", 265 296 lppsh->dwSize, lppsh->dwFlags, lppsh->hwndParent, lppsh->hInstance, 266 297 debugstr_a(lppsh->pszCaption), lppsh->nPages, lppsh->pfnCallback); … … 313 344 314 345 memcpy(&psInfo->ppshheader,lppsh,dwSize); 315 TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%ld\ndwFlags\t\t%08lx\nhwndParent\t% 04x\nhInstance\t%08x\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n",346 TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%ld\ndwFlags\t\t%08lx\nhwndParent\t%p\nhInstance\t%p\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n", 316 347 lppsh->dwSize, lppsh->dwFlags, lppsh->hwndParent, lppsh->hInstance, debugstr_w(lppsh->pszCaption), lppsh->nPages, lppsh->pfnCallback); 317 348 … … 443 474 p += lstrlenW( (LPCWSTR)p ) + 1; 444 475 break; 445 } 476 } 446 477 447 478 /* class */ … … 492 523 * Build the image list for icons 493 524 */ 494 if ((dwFlags & PSP_USEHICON) || (dwFlags & PSP_USEICONID)) 525 if ((dwFlags & PSP_USEHICON) || (dwFlags & PSP_USEICONID)) 495 526 { 496 527 HICON hIcon; … … 499 530 500 531 if (dwFlags & PSP_USEICONID) 501 hIcon = LoadImageW(lppsp->hInstance, lppsp->u2.pszIcon, IMAGE_ICON, 532 hIcon = LoadImageW(lppsp->hInstance, lppsp->u2.pszIcon, IMAGE_ICON, 502 533 icon_cx, icon_cy, LR_DEFAULTCOLOR); 503 534 else … … 569 600 psInfo->ppshheader.hwndParent, 570 601 (DLGPROC) PROPSHEET_DialogProc, 571 (LPARAM)psInfo) ;602 (LPARAM)psInfo) ? TRUE : FALSE; 572 603 573 604 COMCTL32_Free(temp); … … 578 609 /****************************************************************************** 579 610 * PROPSHEET_SizeMismatch 580 * 611 * 581 612 * Verify that the tab control and the "largest" property sheet page dlg. template 582 613 * match in size. … … 702 733 psInfo->height = MulDiv((rc.bottom - rc.top),8,units.top); 703 734 } 704 735 705 736 if ((rc.right - rc.left) < (tabRect.right - tabRect.left)) 706 737 { … … 716 747 rc.right -= rc.left; 717 748 rc.bottom -= rc.top; 749 TRACE("setting tab %08lx, rc (0,0)-(%d,%d)\n", 750 (DWORD)hwndTabCtrl, rc.right, rc.bottom); 718 751 SetWindowPos(hwndTabCtrl, 0, 0, 0, rc.right, rc.bottom, 719 752 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); … … 730 763 * Resize the property sheet. 731 764 */ 765 TRACE("setting dialog %08lx, rc (0,0)-(%d,%d)\n", 766 (DWORD)hwndDlg, rc.right, rc.bottom); 732 767 SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom, 733 768 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); … … 779 814 psInfo->height = MulDiv((rc.bottom - rc.top), 8, units.top); 780 815 } 781 816 782 817 if ((rc.right - rc.left) < (tabRect.right - tabRect.left)) 783 818 { … … 787 822 788 823 TRACE("Biggest page %d %d %d %d\n", rc.left, rc.top, rc.right, rc.bottom); 824 TRACE(" constants padx=%d, pady=%d, butH=%d, lH=%d\n", 825 padding.x, padding.y, buttonHeight, lineHeight); 789 826 790 827 /* Make room */ … … 795 832 * Resize the property sheet. 796 833 */ 834 TRACE("setting dialog %08lx, rc (0,0)-(%d,%d)\n", 835 (DWORD)hwndDlg, rc.right, rc.bottom); 797 836 SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom, 798 837 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); … … 829 868 /* 830 869 * Get the size of the property sheet. 831 */ 870 */ 832 871 GetClientRect(hwndParent, &rcSheet); 833 872 834 /* 873 /* 835 874 * All buttons will be at this y coordinate. 836 875 */ … … 868 907 else 869 908 x = rcSheet.right - (padding.x + buttonWidth); 870 909 871 910 SetWindowPos(hwndButton, 0, x, y, 0, 0, 872 911 SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); … … 885 924 { 886 925 x = rcSheet.right - (padding.x + buttonWidth); 887 926 888 927 SetWindowPos(hwndButton, 0, x, y, 0, 0, 889 928 SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); … … 1064 1103 } 1065 1104 } 1066 1105 1067 1106 hwndControl = GetDlgItem(hwndDlg, idButton); 1068 1107 GetWindowRect(hwndControl, &rc); … … 1136 1175 1137 1176 return TRUE; 1177 } 1178 /* 1179 * Get the size of an in-memory Template 1180 * 1181 *( Based on the code of PROPSHEET_CollectPageInfo) 1182 */ 1183 1184 static UINT GetTemplateSize(DLGTEMPLATE* pTemplate) 1185 1186 { 1187 const WORD* p = (const WORD *)pTemplate; 1188 BOOL istemplateex = (((MyDLGTEMPLATEEX*)pTemplate)->signature == 0xFFFF); 1189 WORD nrofitems; 1190 1191 if (istemplateex) 1192 { 1193 /* DIALOGEX template */ 1194 1195 p++; /* dlgVer */ 1196 p++; /* signature */ 1197 p += 2; /* help ID */ 1198 p += 2; /* ext style */ 1199 p += 2; /* style */ 1200 } 1201 else 1202 { 1203 /* DIALOG template */ 1204 1205 p += 2; /* style */ 1206 p += 2; /* ext style */ 1207 } 1208 1209 nrofitems = (WORD)*p; p++; /* nb items */ 1210 p++; /* x */ 1211 p++; /* y */ 1212 p++; /* width */ 1213 p++; /* height */ 1214 1215 /* menu */ 1216 switch ((WORD)*p) 1217 { 1218 case 0x0000: 1219 p++; 1220 break; 1221 case 0xffff: 1222 p += 2; 1223 break; 1224 default: 1225 TRACE("menu %s\n",debugstr_w((LPCWSTR)p)); 1226 p += lstrlenW( (LPCWSTR)p ) + 1; 1227 break; 1228 } 1229 1230 /* class */ 1231 switch ((WORD)*p) 1232 { 1233 case 0x0000: 1234 p++; 1235 break; 1236 case 0xffff: 1237 p += 2; 1238 break; 1239 default: 1240 TRACE("class %s\n",debugstr_w((LPCWSTR)p)); 1241 p += lstrlenW( (LPCWSTR)p ) + 1; 1242 break; 1243 } 1244 1245 /*title */ 1246 TRACE("title %s\n",debugstr_w((LPCWSTR)p)); 1247 p += lstrlenW((LPCWSTR)p) + 1; 1248 1249 /* font, if DS_FONT set */ 1250 if ((DS_SETFONT & ((istemplateex)? ((MyDLGTEMPLATEEX*)pTemplate)->style : 1251 pTemplate->style))) 1252 { 1253 p+=(istemplateex)?3:1; 1254 TRACE("font %s\n",debugstr_w((LPCWSTR)p)); 1255 p += lstrlenW( (LPCWSTR)p ) + 1; /* the font name*/ 1256 } 1257 1258 TRACE("%d items\n",nrofitems); 1259 while (nrofitems > 0) 1260 { 1261 p = (WORD*)(((DWORD)p + 3) & ~3); /* DWORD align */ 1262 1263 p += (istemplateex ? sizeof(MyDLGITEMTEMPLATEEX) : sizeof(DLGITEMTEMPLATE))/sizeof(WORD); 1264 1265 switch ((WORD)*p) 1266 { 1267 case 0x0000: 1268 p++; 1269 break; 1270 case 0xffff: 1271 TRACE("class ordinal 0x%08lx\n",*(DWORD*)p); 1272 p += 2; 1273 break; 1274 default: 1275 TRACE("class %s\n",debugstr_w((LPCWSTR)p)); 1276 p += lstrlenW( (LPCWSTR)p ) + 1; 1277 break; 1278 } 1279 switch ((WORD)*p) 1280 { 1281 case 0x0000: 1282 p++; 1283 break; 1284 case 0xffff: 1285 TRACE("text ordinal 0x%08lx\n",*(DWORD*)p); 1286 p += 2; 1287 break; 1288 default: 1289 TRACE("text %s\n",debugstr_w((LPCWSTR)p)); 1290 p += lstrlenW( (LPCWSTR)p ) + 1; 1291 break; 1292 } 1293 p += *p + 1; /* Skip extra data */ 1294 --nrofitems; 1295 } 1296 1297 TRACE("%p %p size 0x%08x\n",p, (WORD*)pTemplate,sizeof(WORD)*(p - (WORD*)pTemplate)); 1298 return (p - (WORD*)pTemplate)*sizeof(WORD); 1299 1138 1300 } 1139 1301 … … 1165 1327 1166 1328 if (ppshpage->dwFlags & PSP_DLGINDIRECT) 1167 pTemplate = (DLGTEMPLATE*)ppshpage->u.pResource; 1329 { 1330 pTemplate = (DLGTEMPLATE*)ppshpage->u.pResource; 1331 resSize = GetTemplateSize(pTemplate); 1332 } 1168 1333 else 1169 1334 { … … 1187 1352 * Make a copy of the dialog template to make it writable 1188 1353 */ 1189 temp = COMCTL32_Alloc(resSize);1190 if (!temp)1191 return FALSE;1192 1193 memcpy(temp, pTemplate, resSize);1194 pTemplate = temp;1195 }1354 } 1355 temp = COMCTL32_Alloc(resSize); 1356 if (!temp) 1357 return FALSE; 1358 1359 memcpy(temp, pTemplate, resSize); 1360 pTemplate = temp; 1196 1361 1197 1362 if (((MyDLGTEMPLATEEX*)pTemplate)->signature == 0xFFFF) … … 1234 1399 ppInfo[index].hwndPage = hwndPage; 1235 1400 1236 rc.left = psInfo->x; 1237 rc.top = psInfo->y; 1238 rc.right = psInfo->width; 1239 rc.bottom = psInfo->height; 1240 1241 MapDialogRect(hwndParent, &rc); 1242 1243 pageWidth = rc.right - rc.left; 1244 pageHeight = rc.bottom - rc.top; 1245 1246 if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) 1247 padding = PROPSHEET_GetPaddingInfoWizard(hwndParent, psInfo); 1248 else 1249 { 1250 /* 1251 * Ask the Tab control to fit this page in. 1252 */ 1253 1254 HWND hwndTabCtrl = GetDlgItem(hwndParent, IDC_TABCONTROL); 1255 SendMessageW(hwndTabCtrl, TCM_ADJUSTRECT, FALSE, (LPARAM)&rc); 1256 padding = PROPSHEET_GetPaddingInfo(hwndParent); 1257 } 1258 1259 SetWindowPos(hwndPage, HWND_TOP, 1260 rc.left + padding.x/2, 1261 rc.top + padding.y/2, 1262 pageWidth, pageHeight, 0); 1401 if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) { 1402 /* FIXME: This code may no longer be correct. 1403 * It was not for the non-wizard path. (GLA 6/02) 1404 */ 1405 rc.left = psInfo->x; 1406 rc.top = psInfo->y; 1407 rc.right = psInfo->width; 1408 rc.bottom = psInfo->height; 1409 1410 MapDialogRect(hwndParent, &rc); 1411 1412 pageWidth = rc.right - rc.left; 1413 pageHeight = rc.bottom - rc.top; 1414 1415 padding = PROPSHEET_GetPaddingInfoWizard(hwndParent, psInfo); 1416 TRACE("setting page %08lx, rc (%d,%d)-(%d,%d) w=%d, h=%d, padx=%d, pady=%d\n", 1417 (DWORD)hwndPage, rc.left, rc.top, rc.right, rc.bottom, 1418 pageWidth, pageHeight, padding.x, padding.y); 1419 SetWindowPos(hwndPage, HWND_TOP, 1420 rc.left + padding.x/2, 1421 rc.top + padding.y/2, 1422 pageWidth, pageHeight, 0); 1423 } 1424 else { 1425 /* 1426 * Ask the Tab control to reduce the client rectangle to that 1427 * it has available. 1428 */ 1429 PROPSHEET_GetPageRect(psInfo, hwndParent, &rc); 1430 pageWidth = rc.right - rc.left; 1431 pageHeight = rc.bottom - rc.top; 1432 TRACE("setting page %08lx, rc (%d,%d)-(%d,%d) w=%d, h=%d\n", 1433 (DWORD)hwndPage, rc.left, rc.top, rc.right, rc.bottom, 1434 pageWidth, pageHeight); 1435 SetWindowPos(hwndPage, HWND_TOP, 1436 rc.left, rc.top, 1437 pageWidth, pageHeight, 0); 1438 } 1263 1439 1264 1440 return TRUE; … … 1326 1502 psn.hdr.idFrom = 0; 1327 1503 psn.lParam = 0; 1328 1504 1329 1505 hwndPage = psInfo->proppage[psInfo->active_page].hwndPage; 1330 1506 … … 1365 1541 psn.hdr.idFrom = 0; 1366 1542 psn.lParam = 0; 1367 1543 1368 1544 hwndPage = psInfo->proppage[psInfo->active_page].hwndPage; 1369 1545 … … 1404 1580 psn.hdr.idFrom = 0; 1405 1581 psn.lParam = 0; 1406 1582 1407 1583 hwndPage = psInfo->proppage[psInfo->active_page].hwndPage; 1408 1584 … … 1441 1617 psn.hdr.idFrom = 0; 1442 1618 psn.lParam = 0; 1443 1619 1444 1620 1445 1621 /* … … 1458 1634 psn.hdr.code = PSN_APPLY; 1459 1635 psn.lParam = lParam; 1460 1636 1461 1637 for (i = 0; i < psInfo->nPages; i++) 1462 1638 { … … 1505 1681 psn.hdr.idFrom = 0; 1506 1682 psn.lParam = 0; 1507 1683 1508 1684 if (SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn)) 1509 1685 return; … … 1511 1687 psn.hdr.code = PSN_RESET; 1512 1688 psn.lParam = lParam; 1513 1689 1514 1690 for (i = 0; i < psInfo->nPages; i++) 1515 1691 { … … 1548 1724 psn.hdr.idFrom = 0; 1549 1725 psn.lParam = 0; 1550 1726 1551 1727 SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn); 1552 1728 } … … 1650 1826 1651 1827 /************************************************************************* 1652 * BOOL PROPSHEET_CanSetCurSel [Internal] 1828 * BOOL PROPSHEET_CanSetCurSel [Internal] 1653 1829 * 1654 1830 * Test whether the current page can be changed by sending a PSN_KILLACTIVE … … 1710 1886 PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr); 1711 1887 HWND hwndHelp = GetDlgItem(hwndDlg, IDHELP); 1888 HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL); 1712 1889 1713 1890 TRACE("index %d, skipdir %d, hpage %p\n", index, skipdir, hpage); … … 1725 1902 int result; 1726 1903 PSHNOTIFY psn; 1904 1905 if (hwndTabControl) 1906 SendMessageW(hwndTabControl, TCM_SETCURSEL, index, 0); 1727 1907 1728 1908 psn.hdr.code = PSN_SETACTIVE; … … 1772 1952 1773 1953 /****************************************************************************** 1954 * PROPSHEET_SetCurSelId 1955 * 1956 * Selects the page, specified by resource id. 1957 */ 1958 static void PROPSHEET_SetCurSelId(HWND hwndDlg, int id) 1959 { 1960 int idx; 1961 PropSheetInfo* psInfo = 1962 (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr); 1963 1964 idx = PROPSHEET_FindPageByResId(psInfo, id); 1965 if (idx < psInfo->nPages ) 1966 { 1967 if (PROPSHEET_CanSetCurSel(hwndDlg) != FALSE) 1968 PROPSHEET_SetCurSel(hwndDlg, idx, 1, 0); 1969 } 1970 } 1971 1972 /****************************************************************************** 1774 1973 * PROPSHEET_SetTitleA 1775 1974 */ … … 1779 1978 { 1780 1979 WCHAR szTitle[256]; 1781 MultiByteToWideChar(CP_ACP, 0, lpszText, -1, 1980 MultiByteToWideChar(CP_ACP, 0, lpszText, -1, 1782 1981 szTitle, sizeof szTitle); 1783 1982 PROPSHEET_SetTitleW(hwndDlg, dwStyle, szTitle); … … 1799 1998 TRACE("'%s' (style %08lx)\n", debugstr_w(lpszText), dwStyle); 1800 1999 if (HIWORD(lpszText) == 0) { 1801 if (!LoadStringW(psInfo->ppshheader.hInstance, 2000 if (!LoadStringW(psInfo->ppshheader.hInstance, 1802 2001 LOWORD(lpszText), szTitle, sizeof(szTitle)-sizeof(WCHAR))) 1803 2002 return; … … 1930 2129 item.pszText = (LPWSTR) psInfo->proppage[psInfo->nPages].pszText; 1931 2130 item.cchTextMax = MAX_TABTEXT_LENGTH; 2131 2132 if (psInfo->hImageList) 2133 { 2134 SendMessageW(hwndTabControl, TCM_SETIMAGELIST, 0, (LPARAM)psInfo->hImageList); 2135 } 2136 2137 if ( psInfo->proppage[psInfo->nPages].hasIcon ) 2138 { 2139 item.mask |= TCIF_IMAGE; 2140 item.iImage = psInfo->nPages; 2141 } 1932 2142 1933 2143 SendMessageW(hwndTabControl, TCM_INSERTITEMW, psInfo->nPages + 1, … … 2021 2231 DestroyPropertySheetPage(psInfo->proppage[index].hpage); 2022 2232 } 2023 2233 2024 2234 /* Remove the tab */ 2025 2235 SendMessageW(hwndTabControl, TCM_DELETEITEM, index, 0); … … 2028 2238 psInfo->proppage = COMCTL32_Alloc(sizeof(PropPageInfo) * psInfo->nPages); 2029 2239 2030 if (index > 0) 2240 if (index > 0) 2031 2241 memcpy(&psInfo->proppage[0], &oldPages[0], index * sizeof(PropPageInfo)); 2032 2242 … … 2156 2366 2157 2367 /****************************************************************************** 2158 * PropertySheet (COMCTL32. 87)2159 * PropertySheetA (COMCTL32. 88)2368 * PropertySheet (COMCTL32.@) 2369 * PropertySheetA (COMCTL32.@) 2160 2370 */ 2161 2371 INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh) … … 2201 2411 2202 2412 /****************************************************************************** 2203 * PropertySheetW (COMCTL32. 89)2413 * PropertySheetW (COMCTL32.@) 2204 2414 */ 2205 2415 INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh) … … 2245 2455 2246 2456 /****************************************************************************** 2247 * CreatePropertySheetPage (COMCTL32. 18)2248 * CreatePropertySheetPageA (COMCTL32. 19)2457 * CreatePropertySheetPage (COMCTL32.@) 2458 * CreatePropertySheetPageA (COMCTL32.@) 2249 2459 */ 2250 2460 HPROPSHEETPAGE WINAPI CreatePropertySheetPageA( … … 2257 2467 if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) && HIWORD( ppsp->u.pszTemplate ) ) 2258 2468 { 2259 PROPSHEET_AtoW(&ppsp->u.pszTemplate, lpPropSheetPage->u.pszTemplate); 2469 PROPSHEET_AtoW(&ppsp->u.pszTemplate, lpPropSheetPage->u.pszTemplate); 2260 2470 } 2261 2471 if ( (ppsp->dwFlags & PSP_USEICONID) && HIWORD( ppsp->u2.pszIcon ) ) 2262 2472 { 2263 PROPSHEET_AtoW(&ppsp->u2.pszIcon, lpPropSheetPage->u2.pszIcon); 2473 PROPSHEET_AtoW(&ppsp->u2.pszIcon, lpPropSheetPage->u2.pszIcon); 2264 2474 } 2265 2475 2266 2476 if ((ppsp->dwFlags & PSP_USETITLE) && HIWORD( ppsp->pszTitle )) 2267 2477 { 2268 PROPSHEET_AtoW(&ppsp->pszTitle, lpPropSheetPage->pszTitle); 2478 PROPSHEET_AtoW(&ppsp->pszTitle, lpPropSheetPage->pszTitle); 2269 2479 } 2270 2480 else if ( !(ppsp->dwFlags & PSP_USETITLE) ) … … 2275 2485 2276 2486 /****************************************************************************** 2277 * CreatePropertySheetPageW (COMCTL32. 20)2487 * CreatePropertySheetPageW (COMCTL32.@) 2278 2488 */ 2279 2489 HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage) … … 2310 2520 2311 2521 /****************************************************************************** 2312 * DestroyPropertySheetPage (COMCTL32. 24)2522 * DestroyPropertySheetPage (COMCTL32.@) 2313 2523 */ 2314 2524 BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage) … … 2456 2666 PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 2457 2667 { 2458 TRACE("hwnd=% x msg=%x wparam=%x lparam=%lx\n",2668 TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", 2459 2669 hwnd, uMsg, wParam, lParam); 2460 2670 … … 2472 2682 2473 2683 /* 2474 * psInfo->hwnd is not being used by WINE code - it exists 2475 * for compatibility with "real" Windoze. The same about 2684 * psInfo->hwnd is not being used by WINE code - it exists 2685 * for compatibility with "real" Windoze. The same about 2476 2686 * SetWindowLong - WINE is only using the PropSheetInfoStr 2477 2687 * property. … … 2499 2709 hIcon = psInfo->ppshheader.u.hIcon; 2500 2710 2501 SendMessageW(hwnd, WM_SETICON, 0, hIcon);2711 SendMessageW(hwnd, WM_SETICON, 0, (LPARAM)hIcon); 2502 2712 } 2503 2713 2504 2714 if (psInfo->ppshheader.dwFlags & PSH_USEHICON) 2505 SendMessageW(hwnd, WM_SETICON, 0, psInfo->ppshheader.u.hIcon);2715 SendMessageW(hwnd, WM_SETICON, 0, (LPARAM)psInfo->ppshheader.u.hIcon); 2506 2716 2507 2717 psInfo->strPropertiesFor = strCaption; … … 2528 2738 } 2529 2739 2530 if (psInfo->useCallback) 2531 (*(psInfo->ppshheader.pfnCallback))(hwnd, 2532 PSCB_INITIALIZED, (LPARAM)0); 2740 if (psInfo->useCallback) 2741 (*(psInfo->ppshheader.pfnCallback))(hwnd, 2742 PSCB_INITIALIZED, (LPARAM)0); 2533 2743 2534 2744 idx = psInfo->active_page; 2535 2745 ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[idx].hpage; 2536 2746 psInfo->active_page = -1; 2537 2747 2538 2748 PROPSHEET_SetCurSel(hwnd, idx, 1, psInfo->proppage[idx].hpage); 2539 2749 … … 2548 2758 WCHAR szText[256]; 2549 2759 2550 if (LoadStringW(psInfo->ppshheader.hInstance, 2760 if (LoadStringW(psInfo->ppshheader.hInstance, 2551 2761 (UINT)psInfo->ppshheader.pszCaption, szText, 255)) 2552 2762 PROPSHEET_SetTitleW(hwnd, psInfo->ppshheader.dwFlags, szText); … … 2601 2811 hwndPage = psInfo->proppage[psInfo->active_page].hwndPage; 2602 2812 2603 SetWindowLongW(hwnd, DWL_MSGRESULT, hwndPage);2813 SetWindowLongW(hwnd, DWL_MSGRESULT, (LONG)hwndPage); 2604 2814 2605 2815 return TRUE; … … 2618 2828 HWND hwndTabCtrl = GetDlgItem(hwnd, IDC_TABCONTROL); 2619 2829 2620 SetWindowLongW(hwnd, DWL_MSGRESULT, hwndTabCtrl);2830 SetWindowLongW(hwnd, DWL_MSGRESULT, (LONG)hwndTabCtrl); 2621 2831 2622 2832 return TRUE; … … 2650 2860 if (LoadStringW(COMCTL32_hModule, IDS_CLOSE, buf, sizeof(buf))) 2651 2861 SetWindowTextW(hwndOK, buf); 2652 2862 2653 2863 return FALSE; 2654 2864 } … … 2665 2875 case PSM_REBOOTSYSTEM: 2666 2876 { 2667 PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, 2877 PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, 2668 2878 PropSheetInfoStr); 2669 2879 … … 2675 2885 PROPSHEET_SetTitleA(hwnd, (DWORD) wParam, (LPCSTR) lParam); 2676 2886 return TRUE; 2677 2887 2678 2888 case PSM_SETTITLEW: 2679 2889 PROPSHEET_SetTitleW(hwnd, (DWORD) wParam, (LPCWSTR) lParam); … … 2731 2941 2732 2942 case PSM_SETFINISHTEXTA: 2733 PROPSHEET_SetFinishTextA(hwnd, (LPCSTR) lParam); 2943 PROPSHEET_SetFinishTextA(hwnd, (LPCSTR) lParam); 2734 2944 return TRUE; 2735 2945 … … 2739 2949 2740 2950 case PSM_SETCURSELID: 2741 FIXME("Unimplemented msg PSM_SETCURSELID\n");2742 return FALSE;2951 PROPSHEET_SetCurSelId(hwnd, (int)lParam); 2952 return TRUE; 2743 2953 2744 2954 case PSM_SETFINISHTEXTW: 2745 PROPSHEET_SetFinishTextW(hwnd, (LPCWSTR) lParam); 2955 PROPSHEET_SetFinishTextW(hwnd, (LPCWSTR) lParam); 2746 2956 return FALSE; 2747 2957 … … 2749 2959 return FALSE; 2750 2960 } 2751 2961 2752 2962 return FALSE; 2753 2963 } 2754
Note:
See TracChangeset
for help on using the changeset viewer.