Changeset 4204 for trunk/src/comctl32/toolbar.cpp
- Timestamp:
- Sep 7, 2000, 8:16:52 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/toolbar.cpp
r3970 r4204 1 /* $Id: toolbar.cpp,v 1.1 0 2000-08-08 17:05:00 cbratschiExp $ */1 /* $Id: toolbar.cpp,v 1.11 2000-09-07 18:16:52 sandervl Exp $ */ 2 2 /* 3 3 * Toolbar control … … 2997 2997 if (((INT)LOWORD(lParam) <= 0) || ((INT)HIWORD(lParam) <= 0)) return FALSE; 2998 2998 2999 //SvL: Old code causes assertion failures in MFC apps; this is from the latest 3000 // Wine sources 3001 #if 1 3002 if (infoPtr->nNumButtons > 0) 3003 dprintf(("TOOLBAR_SetBitmapSize: %d buttons, undoc increase to bitmap size : %d-%d -> %d-%d\n", 3004 infoPtr->nNumButtons, 3005 infoPtr->nBitmapWidth, infoPtr->nBitmapHeight, 3006 LOWORD(lParam), HIWORD(lParam))); 3007 #else 2999 3008 /* Bitmap size can only be set before adding any button to the toolbar 3000 3009 according to the documentation. */ 3001 3010 if( infoPtr->nNumButtons != 0 ) 3002 3011 return FALSE; 3012 #endif 3003 3013 3004 3014 infoPtr->nBitmapWidth = (INT)LOWORD(lParam); … … 3111 3121 if (((INT)LOWORD(lParam) <= 0) || ((INT)HIWORD(lParam) <= 0)) return FALSE; 3112 3122 3123 #if 1 3124 //SvL: Same for MFC apps (assertion failed when returning FALSE 3125 /* Button size can only be set before adding any button to the toolbar 3126 according to the documentation. */ 3127 /* this appears to be wrong. WINZIP32.EXE (ver 8) calls this on 3128 one of its buttons after adding it to the toolbar, and it 3129 checks that the return value is nonzero - mjm */ 3130 if( infoPtr->nNumButtons != 0 ) 3131 { 3132 dprintf(("TOOLBAR_SetButtonSize: Button size set after button in toolbar\n")); 3133 return TRUE; 3134 } 3135 #else 3113 3136 /* Button size can only be set before adding any button to the toolbar 3114 3137 according to the documentation. */ 3115 3138 if( infoPtr->nNumButtons != 0 ) 3116 3139 return FALSE; 3140 #endif 3117 3141 3118 3142 infoPtr->nButtonWidth = (INT)LOWORD(lParam); … … 3907 3931 y = parent_rect.top; 3908 3932 3933 //SvL: Latest Wine 3934 #if 1 3935 RECT window_rect; 3936 if (dwStyle & CCS_NORESIZE) { 3937 uPosFlags |= (SWP_NOSIZE | SWP_NOMOVE); 3938 3939 /* 3940 * this sets the working width of the toolbar, and 3941 * Calc Toolbar will not adjust it, only the height 3942 */ 3943 infoPtr->nWidth = parent_rect.right - parent_rect.left; 3944 cy = infoPtr->nHeight; 3945 cx = infoPtr->nWidth; 3946 TOOLBAR_CalcToolbar (hwnd); 3947 infoPtr->nWidth = cx; 3948 infoPtr->nHeight = cy; 3949 } 3950 else { 3951 infoPtr->nWidth = parent_rect.right - parent_rect.left; 3952 TOOLBAR_CalcToolbar (hwnd); 3953 cy = infoPtr->nHeight; 3954 cx = infoPtr->nWidth; 3955 3956 if (dwStyle & CCS_NOMOVEY) { 3957 GetWindowRect(hwnd, &window_rect); 3958 ScreenToClient(parent, (LPPOINT)&window_rect.left); 3959 y = window_rect.top; 3960 } 3961 } 3962 #else 3909 3963 if (dwStyle & CCS_NORESIZE) { 3910 3964 uPosFlags |= (SWP_NOSIZE | SWP_NOMOVE); … … 3923 3977 cx = infoPtr->nWidth; 3924 3978 } 3925 3979 #endif 3926 3980 if (dwStyle & CCS_NOPARENTALIGN) { 3927 3981 uPosFlags |= SWP_NOMOVE;
Note:
See TracChangeset
for help on using the changeset viewer.