Status Bar Question

Tech-Archive recommends: Fix windows errors by optimizing your registry



I'm have programmed a Status Bar with the following code:

'=========== CREATE STATUSBAR ===========

'Size the StatusBar to fit the form
MoveWindow hWndStatus, 0, (lngScaleHeight - SBHeight), _
lngScaleWidth, SBHeight, 1

'This line is required for certain owner-draw
'panels to redraw correctly
InvalidateRect hWndStatus, ByVal 0&, 0



Const nParts As Long = 12
Dim wParts(0 To 11) As Long
'Set panel widths
wParts(0) = iSBDivisions * 20 'For the Data Directory
wParts(1) = iSBDivisions * 27 'Date
wParts(2) = iSBDivisions * 34 'Open
wParts(3) = iSBDivisions * 41 'High
wParts(4) = iSBDivisions * 48 'Low
wParts(5) = iSBDivisions * 55 'Close
wParts(6) = iSBDivisions * 60
wParts(7) = iSBDivisions * 67
wParts(8) = iSBDivisions * 73
wParts(9) = iSBDivisions * 83
wParts(10) = iSBDivisions * 94
wParts(11) = -1


'Tell the StatusBar how many panels we want
'and get it out of simple mode
'SendMessage hWndStatus, SB_SIMPLE, 0, ByVal 0&
SendMessage hWndStatus, SB_SETPARTS, nParts, wParts(0)
SendMessage hWndStatus, SB_SETTEXT, 11 + SBT_POPOUT, ByVal vbNullString
'blank



============

I was wondering if there is a way to detect mouse clicks on this Status Bar?
If I double-click inside one of the panels, I'd like to catch that event and
do something with it.

Is this possible, or to do so would I need to use some kind of Status Bar
control instead?

Thanks.

Webbiz



.



Relevant Pages

  • Re: Status Bar Question
    ... 'Tell the StatusBar how many panels we want ... 'SendMessage hWndStatus, SB_SIMPLE, 0, ByVal 0& ... SendMessage hWndStatus, SB_SETPARTS, nParts, wParts ...
    (microsoft.public.vb.general.discussion)
  • RE: Time VBA or NOW function
    ... I am unable to use a simple cell - addition formula since this is a VBA ... You might consider adding a Microsoft Status Bar Control to your worksheet, ... Click on the Panels tab and then click on the Insert Panel button ...
    (microsoft.public.excel.misc)
  • API Status Bar - Mike?
    ... then it draws a status bar using API. ... Dim bRedrawFlag As Boolean ... 'Divide up screen width to use for panel spacing after converting to ... SendMessage hWndStatus, SB_SETPARTS, nParts, wParts ...
    (comp.lang.basic.visual.misc)
  • Re: Now() Format
    ... You might consider adding a Microsoft Status Bar Control to your worksheet, configure it with 2 panels and set their styles to 6-sbrDate and 5-sbrTime. ... click the icon on that toolbar that puts it into Design Mode; then click the icon for the Control Toolbox. ...
    (microsoft.public.excel.misc)
  • Time VBA or NOW function
    ... You might consider adding a Microsoft Status Bar Control to your worksheet, ... toolbar that puts it into Design Mode; then click the icon for the Control ... Click on the Panels tab and then click on the Insert Panel button ...
    (microsoft.public.excel.misc)