Changeset 10098 for trunk/src/comctl32/propsheet.c
- Timestamp:
- May 15, 2003, 4:26:27 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/propsheet.c
r9425 r10098 26 26 #include <string.h> 27 27 28 #define NONAMELESSUNION 29 #define NONAMELESSSTRUCT 28 30 #include "winbase.h" 29 31 #include "commctrl.h" … … 31 33 #include "winnls.h" 32 34 #include "comctl32.h" 33 #include "heap.h"34 35 35 36 #include "wine/debug.h" … … 113 114 #define MAX_BUTTONTEXT_LENGTH 64 114 115 115 #define PSH_WIZARD97_OLD 0x00002000116 #define PSH_WIZARD97_NEW 0x01000000117 116 #define INTRNL_ANY_WIZARD (PSH_WIZARD | PSH_WIZARD97_OLD | PSH_WIZARD97_NEW | PSH_WIZARD_LITE) 118 117 … … 120 119 * Prototypes 121 120 */ 122 static BOOLPROPSHEET_CreateDialog(PropSheetInfo* psInfo);121 static int PROPSHEET_CreateDialog(PropSheetInfo* psInfo); 123 122 static BOOL PROPSHEET_SizeMismatch(HWND hwndDlg, PropSheetInfo* psInfo); 124 123 static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo); … … 290 289 psInfo->hasHelp = dwFlags & PSH_HASHELP; 291 290 psInfo->hasApply = !(dwFlags & PSH_NOAPPLYNOW); 292 psInfo->useCallback = dwFlags & PSH_USECALLBACK;291 psInfo->useCallback = (dwFlags & PSH_USECALLBACK )&& (lppsh->pfnCallback); 293 292 psInfo->isModeless = dwFlags & PSH_MODELESS; 294 293 … … 341 340 psInfo->hasHelp = dwFlags & PSH_HASHELP; 342 341 psInfo->hasApply = !(dwFlags & PSH_NOAPPLYNOW); 343 psInfo->useCallback = dwFlags & PSH_USECALLBACK;342 psInfo->useCallback = (dwFlags & PSH_USECALLBACK) && (lppsh->pfnCallback); 344 343 psInfo->isModeless = dwFlags & PSH_MODELESS; 345 344 … … 554 553 * Creates the actual property sheet. 555 554 */ 556 BOOLPROPSHEET_CreateDialog(PropSheetInfo* psInfo)555 int PROPSHEET_CreateDialog(PropSheetInfo* psInfo) 557 556 { 558 557 LRESULT ret; … … 570 569 MAKEINTRESOURCEW(resID), 571 570 RT_DIALOGW))) 572 return FALSE;571 return -1; 573 572 574 573 if(!(template = (LPVOID)LoadResource(COMCTL32_hModule, hRes))) 575 return FALSE;574 return -1; 576 575 577 576 /* … … 583 582 584 583 if (!temp) 585 return FALSE;584 return -1; 586 585 587 586 memcpy(temp, template, resSize); … … 597 596 (LPARAM)psInfo); 598 597 else 599 ret = CreateDialogIndirectParamW(psInfo->ppshheader.hInstance, 600 (LPDLGTEMPLATEW) temp, 601 psInfo->ppshheader.hwndParent, 602 PROPSHEET_DialogProc, 603 (LPARAM)psInfo) ? TRUE : FALSE; 598 { 599 ret = (int)CreateDialogIndirectParamW(psInfo->ppshheader.hInstance, 600 (LPDLGTEMPLATEW) temp, 601 psInfo->ppshheader.hwndParent, 602 PROPSHEET_DialogProc, 603 (LPARAM)psInfo); 604 if ( !ret ) ret = -1; 605 } 604 606 605 607 COMCTL32_Free(temp); … … 623 625 */ 624 626 GetClientRect(hwndTabCtrl, &rcOrigTab); 625 TRACE("orig tab % d %d %d %d\n", rcOrigTab.left, rcOrigTab.top,627 TRACE("orig tab %ld %ld %ld %ld\n", rcOrigTab.left, rcOrigTab.top, 626 628 rcOrigTab.right, rcOrigTab.bottom); 627 629 … … 635 637 636 638 MapDialogRect(hwndDlg, &rcPage); 637 TRACE("biggest page % d %d %d %d\n", rcPage.left, rcPage.top,639 TRACE("biggest page %ld %ld %ld %ld\n", rcPage.left, rcPage.top, 638 640 rcPage.right, rcPage.bottom); 639 641 … … 677 679 678 680 MapDialogRect(hwndDlg, &rcPage); 679 TRACE("biggest page % d %d %d %d\n", rcPage.left, rcPage.top,681 TRACE("biggest page %ld %ld %ld %ld\n", rcPage.left, rcPage.top, 680 682 rcPage.right, rcPage.bottom); 681 683 … … 748 750 rc.right -= rc.left; 749 751 rc.bottom -= rc.top; 750 TRACE("setting tab %08lx, rc (0,0)-(% d,%d)\n",752 TRACE("setting tab %08lx, rc (0,0)-(%ld,%ld)\n", 751 753 (DWORD)hwndTabCtrl, rc.right, rc.bottom); 752 754 SetWindowPos(hwndTabCtrl, 0, 0, 0, rc.right, rc.bottom, … … 755 757 GetClientRect(hwndTabCtrl, &rc); 756 758 757 TRACE("tab client rc % d %d %d %d\n",759 TRACE("tab client rc %ld %ld %ld %ld\n", 758 760 rc.left, rc.top, rc.right, rc.bottom); 759 761 … … 764 766 * Resize the property sheet. 765 767 */ 766 TRACE("setting dialog %08lx, rc (0,0)-(% d,%d)\n",768 TRACE("setting dialog %08lx, rc (0,0)-(%ld,%ld)\n", 767 769 (DWORD)hwndDlg, rc.right, rc.bottom); 768 770 SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom, … … 822 824 } 823 825 824 TRACE("Biggest page % d %d %d %d\n", rc.left, rc.top, rc.right, rc.bottom);826 TRACE("Biggest page %ld %ld %ld %ld\n", rc.left, rc.top, rc.right, rc.bottom); 825 827 TRACE(" constants padx=%d, pady=%d, butH=%d, lH=%d\n", 826 828 padding.x, padding.y, buttonHeight, lineHeight); … … 833 835 * Resize the property sheet. 834 836 */ 835 TRACE("setting dialog %08lx, rc (0,0)-(% d,%d)\n",837 TRACE("setting dialog %08lx, rc (0,0)-(%ld,%ld)\n", 836 838 (DWORD)hwndDlg, rc.right, rc.bottom); 837 839 SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom, … … 1425 1427 1426 1428 padding = PROPSHEET_GetPaddingInfoWizard(hwndParent, psInfo); 1427 TRACE("setting page %08lx, rc (% d,%d)-(%d,%d) w=%d, h=%d, padx=%d, pady=%d\n",1429 TRACE("setting page %08lx, rc (%ld,%ld)-(%ld,%ld) w=%d, h=%d, padx=%d, pady=%d\n", 1428 1430 (DWORD)hwndPage, rc.left, rc.top, rc.right, rc.bottom, 1429 1431 pageWidth, pageHeight, padding.x, padding.y); … … 1441 1443 pageWidth = rc.right - rc.left; 1442 1444 pageHeight = rc.bottom - rc.top; 1443 TRACE("setting page %08lx, rc (% d,%d)-(%d,%d) w=%d, h=%d\n",1445 TRACE("setting page %08lx, rc (%ld,%ld)-(%ld,%ld) w=%d, h=%d\n", 1444 1446 (DWORD)hwndPage, rc.left, rc.top, rc.right, rc.bottom, 1445 1447 pageWidth, pageHeight); … … 1617 1619 HWND hwndPage; 1618 1620 PSHNOTIFY psn; 1619 LRESULT msgResult;1620 1621 PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, 1621 1622 PropSheetInfoStr); … … 1651 1652 if (hwndPage) 1652 1653 { 1653 msgResult = SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn); 1654 if (msgResult == PSNRET_INVALID_NOCHANGEPAGE) 1655 return FALSE; 1654 switch (SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn)) 1655 { 1656 case PSNRET_INVALID: 1657 PROPSHEET_ShowPage(hwndDlg, i, psInfo); 1658 /* fall through */ 1659 case PSNRET_INVALID_NOCHANGEPAGE: 1660 return FALSE; 1661 } 1656 1662 } 1657 1663 } … … 2385 2391 PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR, 2386 2392 sizeof(PropSheetInfo)); 2387 inti, n;2393 UINT i, n; 2388 2394 BYTE* pByte; 2389 2395 … … 2429 2435 PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR, 2430 2436 sizeof(PropSheetInfo)); 2431 inti, n;2437 UINT i, n; 2432 2438 BYTE* pByte; 2433 2439
Note:
See TracChangeset
for help on using the changeset viewer.