Mercurial > dwindows
comparison win/dw.c @ 109:94d273843a41
Use DWInstance, and some updates to the spinbutton hack.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 21 Sep 2002 10:38:59 +0000 |
parents | cd0e5cf92f6a |
children | d4c1a9ebc72f |
comparison
equal
deleted
inserted
replaced
108:108674099806 | 109:94d273843a41 |
---|---|
1803 switch( msg ) | 1803 switch( msg ) |
1804 { | 1804 { |
1805 case WM_LBUTTONDOWN: | 1805 case WM_LBUTTONDOWN: |
1806 case WM_MBUTTONDOWN: | 1806 case WM_MBUTTONDOWN: |
1807 case WM_RBUTTONDOWN: | 1807 case WM_RBUTTONDOWN: |
1808 case WM_CHAR: | 1808 case WM_KEYDOWN: |
1809 { | 1809 { |
1810 BOOL ret; | 1810 BOOL ret; |
1811 | 1811 |
1812 if(!cinfo || !cinfo->pOldProc) | 1812 if(!cinfo || !cinfo->pOldProc) |
1813 ret = DefWindowProc(hWnd, msg, mp1, mp2); | 1813 ret = DefWindowProc(hWnd, msg, mp1, mp2); |
1814 ret = CallWindowProc(cinfo->pOldProc, hWnd, msg, mp1, mp2); | 1814 ret = CallWindowProc(cinfo->pOldProc, hWnd, msg, mp1, mp2); |
1815 | 1815 |
1816 /* Tell the edit control that a buttonpress has | 1816 /* Tell the edit control that a buttonpress has |
1817 * occured and to update it's window title. | 1817 * occured and to update it's window title. |
1818 */ | 1818 */ |
1819 if(cinfo->buddy) | 1819 if(cinfo && cinfo->buddy) |
1820 SendMessage(cinfo->buddy, WM_USER+10, 0, 0); | 1820 SendMessage(cinfo->buddy, WM_USER+10, 0, 0); |
1821 | 1821 |
1822 SetTimer(hWnd, 100, 100, (TIMERPROC)NULL); | |
1823 | |
1822 return ret; | 1824 return ret; |
1825 } | |
1826 break; | |
1827 case WM_LBUTTONUP: | |
1828 case WM_MBUTTONUP: | |
1829 case WM_RBUTTONUP: | |
1830 case WM_KEYUP: | |
1831 { | |
1832 BOOL ret; | |
1833 | |
1834 if(!cinfo || !cinfo->pOldProc) | |
1835 ret = DefWindowProc(hWnd, msg, mp1, mp2); | |
1836 ret = CallWindowProc(cinfo->pOldProc, hWnd, msg, mp1, mp2); | |
1837 | |
1838 /* Tell the edit control that a buttonpress has | |
1839 * occured and to update it's window title. | |
1840 */ | |
1841 if(cinfo && cinfo->buddy) | |
1842 SendMessage(cinfo->buddy, WM_USER+10, 0, 0); | |
1843 | |
1844 KillTimer(hWnd, 100); | |
1845 | |
1846 return ret; | |
1847 } | |
1848 break; | |
1849 case WM_TIMER: | |
1850 { | |
1851 if(mp1 == 100) | |
1852 { | |
1853 BOOL ret; | |
1854 | |
1855 if(cinfo && cinfo->buddy) | |
1856 SendMessage(cinfo->buddy, WM_USER+10, 0, 0); | |
1857 | |
1858 if(!cinfo || !cinfo->pOldProc) | |
1859 ret = DefWindowProc(hWnd, msg, mp1, mp2); | |
1860 ret = CallWindowProc(cinfo->pOldProc, hWnd, msg, mp1, mp2); | |
1861 | |
1862 /* Tell the edit control that a buttonpress has | |
1863 * occured and to update it's window title. | |
1864 */ | |
1865 if(cinfo && cinfo->buddy) | |
1866 SendMessage(cinfo->buddy, WM_USER+10, 0, 0); | |
1867 | |
1868 return ret; | |
1869 } | |
1823 } | 1870 } |
1824 break; | 1871 break; |
1825 case WM_USER+10: | 1872 case WM_USER+10: |
1826 { | 1873 { |
1827 if(cinfo->buddy) | 1874 if(cinfo->buddy) |
2629 WS_BORDER | | 2676 WS_BORDER | |
2630 SS_CENTER, | 2677 SS_CENTER, |
2631 0,0,50,20, | 2678 0,0,50,20, |
2632 HWND_DESKTOP, | 2679 HWND_DESKTOP, |
2633 NULL, | 2680 NULL, |
2634 NULL, | 2681 DWInstance, |
2635 NULL); | 2682 NULL); |
2636 | 2683 |
2637 dw_window_set_font(hwndBubble, DefaultFont); | 2684 dw_window_set_font(hwndBubble, DefaultFont); |
2638 dw_window_set_color(hwndBubble, DW_CLR_BLACK, DW_CLR_YELLOW); | 2685 dw_window_set_color(hwndBubble, DW_CLR_BLACK, DW_CLR_YELLOW); |
2639 | 2686 |
2815 * except temporarily hold the child windows before they are | 2862 * except temporarily hold the child windows before they are |
2816 * packed into their correct parent. | 2863 * packed into their correct parent. |
2817 */ | 2864 */ |
2818 | 2865 |
2819 DW_HWND_OBJECT = CreateWindow(ObjectClassName, "", 0, 0, 0, | 2866 DW_HWND_OBJECT = CreateWindow(ObjectClassName, "", 0, 0, 0, |
2820 0, 0, HWND_DESKTOP, NULL, NULL, NULL); | 2867 0, 0, HWND_DESKTOP, NULL, DWInstance, NULL); |
2821 | 2868 |
2822 if(!DW_HWND_OBJECT) | 2869 if(!DW_HWND_OBJECT) |
2823 { | 2870 { |
2824 dw_messagebox("Dynamic Windows", "Could not initialize the object window. error code %d", GetLastError()); | 2871 dw_messagebox("Dynamic Windows", "Could not initialize the object window. error code %d", GetLastError()); |
2825 exit(1); | 2872 exit(1); |
3323 if(flStyle & DW_FCF_TASKLIST) | 3370 if(flStyle & DW_FCF_TASKLIST) |
3324 { | 3371 { |
3325 ULONG newflags = (flStyle | WS_CLIPCHILDREN) & ~DW_FCF_TASKLIST; | 3372 ULONG newflags = (flStyle | WS_CLIPCHILDREN) & ~DW_FCF_TASKLIST; |
3326 | 3373 |
3327 hwndframe = CreateWindowEx(flStyleEx, ClassName, title, newflags, CW_USEDEFAULT, CW_USEDEFAULT, | 3374 hwndframe = CreateWindowEx(flStyleEx, ClassName, title, newflags, CW_USEDEFAULT, CW_USEDEFAULT, |
3328 CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner, NULL, NULL, NULL); | 3375 CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner, NULL, DWInstance, NULL); |
3329 } | 3376 } |
3330 else | 3377 else |
3331 { | 3378 { |
3332 flStyleEx |= WS_EX_TOOLWINDOW; | 3379 flStyleEx |= WS_EX_TOOLWINDOW; |
3333 | 3380 |
3334 hwndframe = CreateWindowEx(flStyleEx, ClassName, title, flStyle | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, | 3381 hwndframe = CreateWindowEx(flStyleEx, ClassName, title, flStyle | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, |
3335 CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner, NULL, NULL, NULL); | 3382 CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner, NULL, DWInstance, NULL); |
3336 } | 3383 } |
3337 SetWindowLong(hwndframe, GWL_USERDATA, (ULONG)newbox); | 3384 SetWindowLong(hwndframe, GWL_USERDATA, (ULONG)newbox); |
3338 | 3385 |
3339 #if 0 | 3386 #if 0 |
3340 if(hwndOwner) | 3387 if(hwndOwner) |
3365 "", | 3412 "", |
3366 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, | 3413 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, |
3367 0,0,2000,1000, | 3414 0,0,2000,1000, |
3368 DW_HWND_OBJECT, | 3415 DW_HWND_OBJECT, |
3369 NULL, | 3416 NULL, |
3370 NULL, | 3417 DWInstance, |
3371 NULL); | 3418 NULL); |
3372 | 3419 |
3373 newbox->cinfo.pOldProc = SubclassWindow(hwndframe, _colorwndproc); | 3420 newbox->cinfo.pOldProc = SubclassWindow(hwndframe, _colorwndproc); |
3374 newbox->cinfo.fore = newbox->cinfo.back = -1; | 3421 newbox->cinfo.fore = newbox->cinfo.back = -1; |
3375 | 3422 |
3398 "", | 3445 "", |
3399 WS_VISIBLE | WS_CHILD, | 3446 WS_VISIBLE | WS_CHILD, |
3400 0,0,2000,1000, | 3447 0,0,2000,1000, |
3401 DW_HWND_OBJECT, | 3448 DW_HWND_OBJECT, |
3402 NULL, | 3449 NULL, |
3403 NULL, | 3450 DWInstance, |
3404 NULL); | 3451 NULL); |
3405 | 3452 |
3406 newbox->grouphwnd = CreateWindow(BUTTONCLASSNAME, | 3453 newbox->grouphwnd = CreateWindow(BUTTONCLASSNAME, |
3407 title, | 3454 title, |
3408 WS_CHILD | BS_GROUPBOX | | 3455 WS_CHILD | BS_GROUPBOX | |
3409 WS_VISIBLE | WS_CLIPCHILDREN, | 3456 WS_VISIBLE | WS_CLIPCHILDREN, |
3410 0,0,2000,1000, | 3457 0,0,2000,1000, |
3411 hwndframe, | 3458 hwndframe, |
3412 NULL, | 3459 NULL, |
3413 NULL, | 3460 DWInstance, |
3414 NULL); | 3461 NULL); |
3415 | 3462 |
3416 SetWindowLong(hwndframe, GWL_USERDATA, (ULONG)newbox); | 3463 SetWindowLong(hwndframe, GWL_USERDATA, (ULONG)newbox); |
3417 dw_window_set_font(newbox->grouphwnd, DefaultFont); | 3464 dw_window_set_font(newbox->grouphwnd, DefaultFont); |
3418 return hwndframe; | 3465 return hwndframe; |
3454 SS_BITMAP | WS_VISIBLE | | 3501 SS_BITMAP | WS_VISIBLE | |
3455 WS_CHILD | WS_CLIPCHILDREN, | 3502 WS_CHILD | WS_CLIPCHILDREN, |
3456 0,0,2000,1000, | 3503 0,0,2000,1000, |
3457 DW_HWND_OBJECT, | 3504 DW_HWND_OBJECT, |
3458 NULL, | 3505 NULL, |
3459 NULL, | 3506 DWInstance, |
3460 NULL); | 3507 NULL); |
3461 } | 3508 } |
3462 | 3509 |
3463 /* | 3510 /* |
3464 * Create a notebook object to be packed. | 3511 * Create a notebook object to be packed. |
3479 "", | 3526 "", |
3480 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, | 3527 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, |
3481 0,0,2000,1000, | 3528 0,0,2000,1000, |
3482 DW_HWND_OBJECT, | 3529 DW_HWND_OBJECT, |
3483 NULL, | 3530 NULL, |
3484 NULL, | 3531 DWInstance, |
3485 NULL); | 3532 NULL); |
3486 SetWindowLong(tmp, GWL_USERDATA, (ULONG)array); | 3533 SetWindowLong(tmp, GWL_USERDATA, (ULONG)array); |
3487 dw_window_set_font(tmp, DefaultFont); | 3534 dw_window_set_font(tmp, DefaultFont); |
3488 return tmp; | 3535 return tmp; |
3489 } | 3536 } |
3654 LVS_SHAREIMAGELISTS | WS_BORDER | | 3701 LVS_SHAREIMAGELISTS | WS_BORDER | |
3655 WS_CLIPCHILDREN, | 3702 WS_CLIPCHILDREN, |
3656 0,0,2000,1000, | 3703 0,0,2000,1000, |
3657 DW_HWND_OBJECT, | 3704 DW_HWND_OBJECT, |
3658 (HMENU)id, | 3705 (HMENU)id, |
3659 NULL, | 3706 DWInstance, |
3660 NULL); | 3707 NULL); |
3661 ContainerInfo *cinfo = (ContainerInfo *)calloc(1, sizeof(ContainerInfo)); | 3708 ContainerInfo *cinfo = (ContainerInfo *)calloc(1, sizeof(ContainerInfo)); |
3662 | 3709 |
3663 if(!cinfo) | 3710 if(!cinfo) |
3664 { | 3711 { |
3689 TVS_HASBUTTONS | TVS_LINESATROOT | | 3736 TVS_HASBUTTONS | TVS_LINESATROOT | |
3690 WS_BORDER | WS_CLIPCHILDREN, | 3737 WS_BORDER | WS_CLIPCHILDREN, |
3691 0,0,2000,1000, | 3738 0,0,2000,1000, |
3692 DW_HWND_OBJECT, | 3739 DW_HWND_OBJECT, |
3693 (HMENU)id, | 3740 (HMENU)id, |
3694 NULL, | 3741 DWInstance, |
3695 NULL); | 3742 NULL); |
3696 ContainerInfo *cinfo = (ContainerInfo *)calloc(1, sizeof(ContainerInfo)); | 3743 ContainerInfo *cinfo = (ContainerInfo *)calloc(1, sizeof(ContainerInfo)); |
3697 TreeView_SetItemHeight(tmp, 16); | 3744 TreeView_SetItemHeight(tmp, 16); |
3698 | 3745 |
3699 if(!cinfo) | 3746 if(!cinfo) |
3752 BS_TEXT | WS_VISIBLE | | 3799 BS_TEXT | WS_VISIBLE | |
3753 WS_CHILD | WS_CLIPCHILDREN, | 3800 WS_CHILD | WS_CLIPCHILDREN, |
3754 0,0,2000,1000, | 3801 0,0,2000,1000, |
3755 DW_HWND_OBJECT, | 3802 DW_HWND_OBJECT, |
3756 (HMENU)id, | 3803 (HMENU)id, |
3757 NULL, | 3804 DWInstance, |
3758 NULL); | 3805 NULL); |
3759 dw_window_set_font(tmp, DefaultFont); | 3806 dw_window_set_font(tmp, DefaultFont); |
3760 return tmp; | 3807 return tmp; |
3761 } | 3808 } |
3762 | 3809 |
3773 BS_TEXT | WS_VISIBLE | | 3820 BS_TEXT | WS_VISIBLE | |
3774 WS_CHILD | WS_CLIPCHILDREN, | 3821 WS_CHILD | WS_CLIPCHILDREN, |
3775 0,0,2000,1000, | 3822 0,0,2000,1000, |
3776 DW_HWND_OBJECT, | 3823 DW_HWND_OBJECT, |
3777 (HMENU)id, | 3824 (HMENU)id, |
3778 NULL, | 3825 DWInstance, |
3779 NULL); | 3826 NULL); |
3780 dw_window_set_font(tmp, DefaultFont); | 3827 dw_window_set_font(tmp, DefaultFont); |
3781 SubclassWindow(tmp, _statuswndproc); | 3828 SubclassWindow(tmp, _statuswndproc); |
3782 return tmp; | 3829 return tmp; |
3783 } | 3830 } |
3798 ES_WANTRETURN | WS_CHILD | | 3845 ES_WANTRETURN | WS_CHILD | |
3799 WS_CLIPCHILDREN, | 3846 WS_CLIPCHILDREN, |
3800 0,0,2000,1000, | 3847 0,0,2000,1000, |
3801 DW_HWND_OBJECT, | 3848 DW_HWND_OBJECT, |
3802 (HMENU)id, | 3849 (HMENU)id, |
3803 NULL, | 3850 DWInstance, |
3804 NULL); | 3851 NULL); |
3805 ContainerInfo *cinfo = (ContainerInfo *)calloc(1, sizeof(ContainerInfo)); | 3852 ContainerInfo *cinfo = (ContainerInfo *)calloc(1, sizeof(ContainerInfo)); |
3806 | 3853 |
3807 if(!cinfo) | 3854 if(!cinfo) |
3808 { | 3855 { |
3833 WS_BORDER | ES_AUTOHSCROLL | | 3880 WS_BORDER | ES_AUTOHSCROLL | |
3834 WS_VISIBLE | WS_CLIPCHILDREN, | 3881 WS_VISIBLE | WS_CLIPCHILDREN, |
3835 0,0,2000,1000, | 3882 0,0,2000,1000, |
3836 DW_HWND_OBJECT, | 3883 DW_HWND_OBJECT, |
3837 (HMENU)id, | 3884 (HMENU)id, |
3838 NULL, | 3885 DWInstance, |
3839 NULL); | 3886 NULL); |
3840 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); | 3887 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); |
3841 | 3888 |
3842 cinfo->back = cinfo->fore = -1; | 3889 cinfo->back = cinfo->fore = -1; |
3843 cinfo->buddy = 0; | 3890 cinfo->buddy = 0; |
3863 ES_PASSWORD | WS_BORDER | WS_VISIBLE | | 3910 ES_PASSWORD | WS_BORDER | WS_VISIBLE | |
3864 ES_AUTOHSCROLL | WS_CLIPCHILDREN, | 3911 ES_AUTOHSCROLL | WS_CLIPCHILDREN, |
3865 0,0,2000,1000, | 3912 0,0,2000,1000, |
3866 DW_HWND_OBJECT, | 3913 DW_HWND_OBJECT, |
3867 (HMENU)id, | 3914 (HMENU)id, |
3868 NULL, | 3915 DWInstance, |
3869 NULL); | 3916 NULL); |
3870 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); | 3917 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); |
3871 | 3918 |
3872 cinfo->back = cinfo->fore = -1; | 3919 cinfo->back = cinfo->fore = -1; |
3873 cinfo->buddy = 0; | 3920 cinfo->buddy = 0; |
3904 WS_CHILD | CBS_DROPDOWN | WS_VSCROLL | | 3951 WS_CHILD | CBS_DROPDOWN | WS_VSCROLL | |
3905 WS_CLIPCHILDREN | WS_VISIBLE, | 3952 WS_CLIPCHILDREN | WS_VISIBLE, |
3906 0,0,2000,1000, | 3953 0,0,2000,1000, |
3907 DW_HWND_OBJECT, | 3954 DW_HWND_OBJECT, |
3908 (HMENU)id, | 3955 (HMENU)id, |
3909 NULL, | 3956 DWInstance, |
3910 NULL); | 3957 NULL); |
3911 ColorInfo *cinfo = (ColorInfo *)calloc(1, sizeof(ColorInfo)); | 3958 ColorInfo *cinfo = (ColorInfo *)calloc(1, sizeof(ColorInfo)); |
3912 ColorInfo *cinfo2 = (ColorInfo *)calloc(1, sizeof(ColorInfo)); | 3959 ColorInfo *cinfo2 = (ColorInfo *)calloc(1, sizeof(ColorInfo)); |
3913 | 3960 |
3914 if(!cinfo || !cinfo2) | 3961 if(!cinfo || !cinfo2) |
3946 WS_CHILD | BS_PUSHBUTTON | | 3993 WS_CHILD | BS_PUSHBUTTON | |
3947 WS_VISIBLE | WS_CLIPCHILDREN, | 3994 WS_VISIBLE | WS_CLIPCHILDREN, |
3948 0,0,2000,1000, | 3995 0,0,2000,1000, |
3949 DW_HWND_OBJECT, | 3996 DW_HWND_OBJECT, |
3950 (HMENU)id, | 3997 (HMENU)id, |
3951 NULL, | 3998 DWInstance, |
3952 NULL); | 3999 NULL); |
3953 | 4000 |
3954 bubble->id = id; | 4001 bubble->id = id; |
3955 bubble->bubbletext[0] = '\0'; | 4002 bubble->bubbletext[0] = '\0'; |
3956 bubble->pOldProc = (WNDPROC)SubclassWindow(tmp, _BtProc); | 4003 bubble->pOldProc = (WNDPROC)SubclassWindow(tmp, _BtProc); |
3978 BS_BITMAP | WS_CLIPCHILDREN | | 4025 BS_BITMAP | WS_CLIPCHILDREN | |
3979 WS_VISIBLE, | 4026 WS_VISIBLE, |
3980 0,0,2000,1000, | 4027 0,0,2000,1000, |
3981 DW_HWND_OBJECT, | 4028 DW_HWND_OBJECT, |
3982 (HMENU)id, | 4029 (HMENU)id, |
3983 NULL, | 4030 DWInstance, |
3984 NULL); | 4031 NULL); |
3985 | 4032 |
3986 bubble->id = id; | 4033 bubble->id = id; |
3987 strncpy(bubble->bubbletext, text, BUBBLE_HELP_MAX - 1); | 4034 strncpy(bubble->bubbletext, text, BUBBLE_HELP_MAX - 1); |
3988 bubble->bubbletext[BUBBLE_HELP_MAX - 1] = '\0'; | 4035 bubble->bubbletext[BUBBLE_HELP_MAX - 1] = '\0'; |
4011 WS_CHILD | WS_BORDER | WS_VISIBLE | | 4058 WS_CHILD | WS_BORDER | WS_VISIBLE | |
4012 ES_NUMBER | WS_CLIPCHILDREN, | 4059 ES_NUMBER | WS_CLIPCHILDREN, |
4013 0,0,2000,1000, | 4060 0,0,2000,1000, |
4014 DW_HWND_OBJECT, | 4061 DW_HWND_OBJECT, |
4015 NULL, | 4062 NULL, |
4016 NULL, | 4063 DWInstance, |
4017 NULL); | 4064 NULL); |
4018 HWND tmp = CreateWindowEx(WS_EX_CLIENTEDGE, | 4065 HWND tmp = CreateWindowEx(WS_EX_CLIENTEDGE, |
4019 UPDOWN_CLASS, | 4066 UPDOWN_CLASS, |
4020 NULL, | 4067 NULL, |
4021 WS_CHILD | UDS_ALIGNRIGHT | WS_BORDER | | 4068 WS_CHILD | UDS_ALIGNRIGHT | WS_BORDER | |
4022 UDS_ARROWKEYS | UDS_SETBUDDYINT | | 4069 UDS_ARROWKEYS | UDS_SETBUDDYINT | |
4023 UDS_WRAP | UDS_NOTHOUSANDS | WS_VISIBLE, | 4070 UDS_WRAP | UDS_NOTHOUSANDS | WS_VISIBLE, |
4024 0,0,2000,1000, | 4071 0,0,2000,1000, |
4025 DW_HWND_OBJECT, | 4072 DW_HWND_OBJECT, |
4026 (HMENU)id, | 4073 (HMENU)id, |
4027 NULL, | 4074 DWInstance, |
4028 NULL); | 4075 NULL); |
4029 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); | 4076 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); |
4030 | 4077 |
4031 SendMessage(tmp, UDM_SETBUDDY, (WPARAM)buddy, 0); | 4078 SendMessage(tmp, UDM_SETBUDDY, (WPARAM)buddy, 0); |
4032 cinfo->back = cinfo->fore = -1; | 4079 cinfo->back = cinfo->fore = -1; |
4057 WS_CHILD | BS_AUTORADIOBUTTON | | 4104 WS_CHILD | BS_AUTORADIOBUTTON | |
4058 WS_CLIPCHILDREN | WS_VISIBLE, | 4105 WS_CLIPCHILDREN | WS_VISIBLE, |
4059 0,0,2000,1000, | 4106 0,0,2000,1000, |
4060 DW_HWND_OBJECT, | 4107 DW_HWND_OBJECT, |
4061 (HMENU)id, | 4108 (HMENU)id, |
4062 NULL, | 4109 DWInstance, |
4063 NULL); | 4110 NULL); |
4064 BubbleButton *bubble = calloc(1, sizeof(BubbleButton)); | 4111 BubbleButton *bubble = calloc(1, sizeof(BubbleButton)); |
4065 bubble->id = id; | 4112 bubble->id = id; |
4066 bubble->pOldProc = (WNDPROC)SubclassWindow(tmp, _BtProc); | 4113 bubble->pOldProc = (WNDPROC)SubclassWindow(tmp, _BtProc); |
4067 bubble->cinfo.fore = -1; | 4114 bubble->cinfo.fore = -1; |
4086 WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | | 4133 WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | |
4087 (vertical ? TBS_VERT : TBS_HORZ), | 4134 (vertical ? TBS_VERT : TBS_HORZ), |
4088 0,0,2000,1000, | 4135 0,0,2000,1000, |
4089 DW_HWND_OBJECT, | 4136 DW_HWND_OBJECT, |
4090 NULL, | 4137 NULL, |
4091 NULL, | 4138 DWInstance, |
4092 NULL); | 4139 NULL); |
4093 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); | 4140 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); |
4094 | 4141 |
4095 cinfo->back = cinfo->fore = -1; | 4142 cinfo->back = cinfo->fore = -1; |
4096 cinfo->buddy = 0; | 4143 cinfo->buddy = 0; |
4113 "", | 4160 "", |
4114 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, | 4161 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, |
4115 0,0,2000,1000, | 4162 0,0,2000,1000, |
4116 DW_HWND_OBJECT, | 4163 DW_HWND_OBJECT, |
4117 NULL, | 4164 NULL, |
4118 NULL, | 4165 DWInstance, |
4119 NULL); | 4166 NULL); |
4120 } | 4167 } |
4121 | 4168 |
4122 /* | 4169 /* |
4123 * Create a new checkbox window (widget) to be packed. | 4170 * Create a new checkbox window (widget) to be packed. |
4133 WS_CHILD | BS_AUTOCHECKBOX | | 4180 WS_CHILD | BS_AUTOCHECKBOX | |
4134 BS_TEXT | WS_CLIPCHILDREN | WS_VISIBLE, | 4181 BS_TEXT | WS_CLIPCHILDREN | WS_VISIBLE, |
4135 0,0,2000,1000, | 4182 0,0,2000,1000, |
4136 DW_HWND_OBJECT, | 4183 DW_HWND_OBJECT, |
4137 NULL, | 4184 NULL, |
4138 NULL, | 4185 DWInstance, |
4139 NULL); | 4186 NULL); |
4140 bubble->id = id; | 4187 bubble->id = id; |
4141 bubble->checkbox = 1; | 4188 bubble->checkbox = 1; |
4142 bubble->pOldProc = (WNDPROC)SubclassWindow(tmp, _BtProc); | 4189 bubble->pOldProc = (WNDPROC)SubclassWindow(tmp, _BtProc); |
4143 bubble->cinfo.fore = -1; | 4190 bubble->cinfo.fore = -1; |
4162 LBS_NOTIFY | WS_BORDER | WS_CLIPCHILDREN | | 4209 LBS_NOTIFY | WS_BORDER | WS_CLIPCHILDREN | |
4163 WS_VSCROLL | (multi ? LBS_MULTIPLESEL : 0) , | 4210 WS_VSCROLL | (multi ? LBS_MULTIPLESEL : 0) , |
4164 0,0,2000,1000, | 4211 0,0,2000,1000, |
4165 DW_HWND_OBJECT, | 4212 DW_HWND_OBJECT, |
4166 NULL, | 4213 NULL, |
4167 NULL, | 4214 DWInstance, |
4168 NULL); | 4215 NULL); |
4169 ContainerInfo *cinfo = (ContainerInfo *)calloc(1, sizeof(ContainerInfo)); | 4216 ContainerInfo *cinfo = (ContainerInfo *)calloc(1, sizeof(ContainerInfo)); |
4170 | 4217 |
4171 if(!cinfo) | 4218 if(!cinfo) |
4172 { | 4219 { |
6076 "", | 6123 "", |
6077 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, | 6124 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, |
6078 0,0,2000,1000, | 6125 0,0,2000,1000, |
6079 DW_HWND_OBJECT, | 6126 DW_HWND_OBJECT, |
6080 NULL, | 6127 NULL, |
6081 NULL, | 6128 DWInstance, |
6082 NULL); | 6129 NULL); |
6083 newbox->pad = 0; | 6130 newbox->pad = 0; |
6084 newbox->type = 0; | 6131 newbox->type = 0; |
6085 newbox->count = 0; | 6132 newbox->count = 0; |
6086 newbox->grouphwnd = (HWND)NULL; | 6133 newbox->grouphwnd = (HWND)NULL; |
6643 "", | 6690 "", |
6644 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, | 6691 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, |
6645 0,0,2000,1000, | 6692 0,0,2000,1000, |
6646 DW_HWND_OBJECT, | 6693 DW_HWND_OBJECT, |
6647 NULL, | 6694 NULL, |
6648 NULL, | 6695 DWInstance, |
6649 NULL); | 6696 NULL); |
6650 if(thisbox->type == BOXVERT) | 6697 if(thisbox->type == BOXVERT) |
6651 dw_box_pack_start(box, tmp, 1, SPLITBAR_WIDTH, TRUE, FALSE, 0); | 6698 dw_box_pack_start(box, tmp, 1, SPLITBAR_WIDTH, TRUE, FALSE, 0); |
6652 else | 6699 else |
6653 dw_box_pack_start(box, tmp, SPLITBAR_WIDTH, 1, FALSE, TRUE, 0); | 6700 dw_box_pack_start(box, tmp, SPLITBAR_WIDTH, 1, FALSE, TRUE, 0); |
6670 "", | 6717 "", |
6671 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, | 6718 WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN, |
6672 0,0,2000,1000, | 6719 0,0,2000,1000, |
6673 DW_HWND_OBJECT, | 6720 DW_HWND_OBJECT, |
6674 NULL, | 6721 NULL, |
6675 NULL, | 6722 DWInstance, |
6676 NULL); | 6723 NULL); |
6677 if(thisbox->type == BOXVERT) | 6724 if(thisbox->type == BOXVERT) |
6678 dw_box_pack_end(box, tmp, 1, SPLITBAR_WIDTH, TRUE, FALSE, 0); | 6725 dw_box_pack_end(box, tmp, 1, SPLITBAR_WIDTH, TRUE, FALSE, 0); |
6679 else | 6726 else |
6680 dw_box_pack_end(box, tmp, SPLITBAR_WIDTH, 1, FALSE, TRUE, 0); | 6727 dw_box_pack_end(box, tmp, SPLITBAR_WIDTH, 1, FALSE, TRUE, 0); |