I have a matter to get the get the text of a statusbar.
i hope to get the statusbar text from another windows (not get the statusbar text from my window but get the statusbar text from the purebasic editor for example)
Code: Select all
Delay(1000)
; Get the Foreground Window
WindowE = GetForegroundWindow_()
; Get the handle of the statusbar
hwndStatus = FindWindowEx_(WindowE, 0, "msctls_statusbar32", 0)
; get the number of field
NbField = SendMessage_(hwndStatus, #SB_GETPARTS, 50, 0)
Debug "Type of operation used To draw the text :"
Debug Str(0) + " : The text is drawn with a border to appear lower than the plane of the window."
Debug Str(#SBT_NOBORDERS) + " : The text is drawn without borders."
Debug Str(#SBT_POPOUT) + " : The text is drawn with a border to appear higher than the plane of the window."
Debug ""
Debug "Number of parts = " + Str(NbField)
Debug ""
For n = 0 To NbField - 1
; Get the text length
length.l = SendMessage_(hwndStatus, #SB_GETTEXTLENGTH, n, 0)
Low = length & $FFFF
High = length >> 16 & $FFFF
Debug "Text length = " + Str(Low)
Debug "Text draw with = " + Str(High)
; get the Text
Text.s = Space(Low)
r = SendMessage_(hwndStatus, #SB_GETTEXT, n, Text)
Debug "Text = " + Text
Next
Could you help me, thanks
