Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25989/src/cbits/Win32
Modified Files:
ToolBar.c
Log Message:
bugfix
Index: ToolBar.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ToolBar.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** ToolBar.c 16 May 2004 08:20:40 -0000 1.23
--- ToolBar.c 25 May 2004 21:00:19 -0000 1.24
***************
*** 893,897 ****
int osGetToolItemPos(ToolHandle toolItem)
{
! return SendMessage(toolItem->hToolBar, TB_COMMANDTOINDEX, toolItem->action->id, 0);
}
--- 893,911 ----
int osGetToolItemPos(ToolHandle toolItem)
{
! int i, nButtons;
! TBBUTTON tbb;
!
! nButtons = (int) SendMessage(toolItem->hToolBar, TB_BUTTONCOUNT, 0, 0);
!
! for (i = 0; i < nButtons; i++)
! {
! if (SendMessage(toolItem->hToolBar, TB_GETBUTTON, i, (LPARAM)&tbb) && (tbb.fsStyle & TBSTYLE_SEP) == 0)
! {
! if (((ToolHandle *) tbb.dwData) == toolItem)
! return i;
! }
! }
!
! return -1;
}
|