Changeset 123 for trunk/src/helpers/dialog.c
- Timestamp:
- Dec 14, 2001, 11:41:33 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/dialog.c
r122 r123 678 678 cy = pcp->cy; 679 679 680 // change the title if this is a static with SS_BITMAP; 681 // we have used a HBITMAP in there! 682 if ( ((ULONG)pControlDef->pcszClass == 0xffff0005L) // WC_STATIC: 683 && ( ((flStyle & 0x0F) == SS_BITMAP) 684 || ((flStyle & 0x0F) == SS_ICON) 685 ) 686 ) 687 { 688 // change style flag to not use SS_BITMAP nor SS_ICON; 689 // control creation fails otherwise (stupid, stupid PM) 690 flOld = flStyle; 691 flStyle = ((flStyle & ~0x0F) | SS_FGNDFRAME); 692 pcszTitle = ""; 693 lHandleSet = (LHANDLE)pControlDef->pcszText; 694 } 695 // hack the stupid drop-down combobox which doesn't 696 // expand otherwise (the size of the drop-down is 697 // the full size of the control... duh) 698 else if ( ((ULONG)pControlDef->pcszClass == 0xffff0002L) 699 && (flStyle & (CBS_DROPDOWN | CBS_DROPDOWNLIST)) 700 ) 701 { 702 y -= 100; 703 cy += 100; 704 } 705 // the stupid entry field resizes itself if it has 706 // the ES_MARGIN style, so correlate that too... dammit 707 // V0.9.16 (2001-12-08) [umoeller] 708 else if ( ((ULONG)pControlDef->pcszClass == 0xffff0006L) 709 && (flStyle & ES_MARGIN) 710 ) 711 { 712 LONG cxMargin = 3 * WinQuerySysValue(HWND_DESKTOP, SV_CXBORDER); 713 LONG cyMargin = 3 * WinQuerySysValue(HWND_DESKTOP, SV_CYBORDER); 714 715 x += cxMargin; 716 y += cxMargin; 717 } 680 // now implement hacks for certain controls 681 switch ((ULONG)pControlDef->pcszClass) 682 { 683 case 0xffff0005L: // WC_STATIC: 684 // change the title if this is a static with SS_BITMAP; 685 // we have used a HBITMAP in there! 686 if ( ( ((flStyle & 0x0F) == SS_BITMAP) 687 || ((flStyle & 0x0F) == SS_ICON) 688 ) 689 ) 690 { 691 // change style flag to not use SS_BITMAP nor SS_ICON; 692 // control creation fails otherwise (stupid, stupid PM) 693 flOld = flStyle; 694 flStyle = ((flStyle & ~0x0F) | SS_FGNDFRAME); 695 pcszTitle = ""; 696 lHandleSet = (LHANDLE)pControlDef->pcszText; 697 } 698 break; 699 700 case 0xffff0002L: // combobox 701 // hack the stupid drop-down combobox which doesn't 702 // expand otherwise (the size of the drop-down is 703 // the full size of the control... duh) 704 if (flStyle & (CBS_DROPDOWN | CBS_DROPDOWNLIST)) 705 { 706 y -= 100; 707 cy += 100; 708 } 709 break; 710 711 case 0xffff0006L: // entry field 712 // the stupid entry field resizes itself if it has 713 // the ES_MARGIN style, so correlate that too... dammit 714 // V0.9.16 (2001-12-08) [umoeller] 715 if (flStyle & ES_MARGIN) 716 { 717 LONG cxMargin = 3 * WinQuerySysValue(HWND_DESKTOP, SV_CXBORDER); 718 LONG cyMargin = 3 * WinQuerySysValue(HWND_DESKTOP, SV_CYBORDER); 719 720 x += cxMargin; 721 y += cxMargin; 722 } 723 break; 724 } // end switch ((ULONG)pControlDef->pcszClass) 718 725 } 719 726
Note:
See TracChangeset
for help on using the changeset viewer.