Alaska Software Inc. - Timer in toolbar
Username: Password:
AuthorTopic: Timer in toolbar
Guido BaiocchiTimer in toolbar
on Tue, 29 Nov 2016 19:07:33 +0100
Jim LeeRe: Timer in toolbar
on Tue, 29 Nov 2016 21:57:39 +0100
XbpToolBar() is using Microsoft Common Controls as activeX and have no 
Ownerdraw so you can't use Pablos Tricks.

when :addItem() => oButton Object
you can change oButton:caption with TIME() within a Thread

p.s. to show TIME i recommend to use Statusbar
Jim LeeRe: Timer in toolbar
on Thu, 01 Dec 2016 01:07:15 +0100
i had a deeper look to Pablos Class Code : it will display Time in Titlebar 
on right Side ... but only in Win XP you can see it
Titlebar Area since Vista are under Control of DWM and use 
DwmExtendFrameIntoClientArea() to paint.

but you ask for Toolbar so just adjust Position of rc

  now adjust the right end of the rectangle according
  the state of the buttons, we asume the buttons are square
  but with some themes maybe wrong and we must query the theme metrics 
   rc[2] += nTbHeight
   rc[4] += nTbHeight


#define SM_CYCAPTION 4
FUNCTION xbpGetSystemMetrics( nValue )
RETURN DllCall( "USER32.DLL", DLL_STDCALL, "GetSystemMetrics", nValue )

now TIME() will display on Menubar, Toolbar or what else which is just under 
Titlebar in upper right corner