i have a "selfmade" HB_FUNC( PAINTTAB ) in HBFM since v0.038
it is to Color Tab-Control Background and it work when have more than 1 TAB when have only 1 TAB it fail ... but work when using Debugger or MsgInfo()
Code: Select all
STATIC FUNCTION Paint_Tab_Window( nNo )
LOCAL hWnd, i, iMax
LOCAL nOffSet := 0
LOCAL nheight := 0
LOCAL aRect
IF nNo = 1
hWnd := WinLeft.Tab_Left.handle
iMax := LEN( Stack_Left )
ELSE
hWnd := WinRight.Tab_Right.handle
iMax := LEN( Stack_Right )
ENDIF
FOR i := 1 TO iMax
aRect := TABCTRL_GETITEMRECT( hWnd, i-1 )
nOffSet += aRect[ 3 ] - aRect[ 1 ]
nheight := aRect[ 4 ] - aRect[ 2 ]
NEXT
IF iMax = 1
msginfo(VAR2CHAR(nOffSet))
ENDIF
PAINTTAB( hWnd, SP_nColor1(), nOffSet, nheight )
RETURN NIL
include HB_FUNC( PAINTTAB ) and some Demo Code ( NOT full working Demo ) who have a Idea why it does not work when have only 1 x TAB