Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv22705/src/cbits/Win32
Modified Files:
Menu.c RadioBox.c ToolBar.c
Log Message:
bugfixes
Index: Menu.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Menu.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Menu.c 23 Aug 2003 08:30:50 -0000 1.15
--- Menu.c 24 Aug 2003 19:28:57 -0000 1.16
***************
*** 251,254 ****
--- 251,257 ----
MenuHandle child, handle, *phandle;
+ if (!(handles && *handles))
+ return;
+
phandle=handles;
for (;;)
Index: RadioBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/RadioBox.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RadioBox.c 24 Aug 2003 10:50:18 -0000 1.5
--- RadioBox.c 24 Aug 2003 19:28:57 -0000 1.6
***************
*** 66,70 ****
void osSetRadioBoxState(WindowHandle radiobox, BOOL state)
{
! SendMessage(radiobox,BM_SETCHECK,state ? BST_CHECKED : BST_UNCHECKED,0);
};
--- 66,86 ----
void osSetRadioBoxState(WindowHandle radiobox, BOOL state)
{
! HWND hNextCtrl;
!
! if (state)
! {
! SendMessage(radiobox,BM_SETCHECK,BST_CHECKED,0);
!
! hNextCtrl = radiobox;
! for (;;)
! {
! hNextCtrl = (WindowHandle) GetWindowLong(hNextCtrl, GWL_USERDATA);
! if (hNextCtrl == radiobox) break;
!
! SendMessage(hNextCtrl,BM_SETCHECK,BST_UNCHECKED,0);
! }
! }
! else
! SendMessage(radiobox,BM_SETCHECK,BST_UNCHECKED,0);
};
***************
*** 73,76 ****
--- 89,95 ----
WindowHandle first, next, child, handle, *phandle;
+ if (!(handles && *handles))
+ return;
+
phandle=handles;
for (;;)
***************
*** 87,90 ****
--- 106,111 ----
}
SetWindowLong(child, GWL_USERDATA, (LONG) first);
+
+ SendMessage(handle,BM_SETCHECK,(handle == *handles) ? BST_CHECKED : BST_UNCHECKED,0);
phandle++;
Index: ToolBar.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ToolBar.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** ToolBar.c 23 Aug 2003 11:05:59 -0000 1.16
--- ToolBar.c 24 Aug 2003 19:28:57 -0000 1.17
***************
*** 911,914 ****
--- 911,917 ----
ToolHandle next, handle, *phandle;
+ if (!(handles && *handles))
+ return;
+
phandle=handles;
for (;;)
|