"32-bit value associated with the text"
Posted on 2004-05-02
i am trying to read the status bar of another process, and have had success getting the text of most statusbars. for instance, i can read all 3 panels of Windows Explorer's statusbar. however, i am actually trying to read the status bar panels of the program FlashFXP. There are 7 panels, and i can read panels 3-7 no problem; however, when i sendmessage SB_GETTEXT to panel 1 or 2... something different happens. Normally (for panel 3-7, or for the Windows Explorer panels) the returned value of the SB_GETTEXT SendMessage is the text length; however, the result for panels 1 and 2 seems to be a pointer to a string... but i'm not sure... when i try to read the buffer and convert the string to unicode... it comes out "garbled" and almost looks like an encrypted string. But to make things more confusing, I do see readable text within the garbage characters... but only for panel 1... it's all garbage for panel 2.
...having read the following passage about SB_GETTEXT, i am under the impression that panels 1 and 2 of FlashFXP is of the "style" of SBT_OWNERDRAW... which "returns the 32-bit value associated with the text instead of the length and operation type."
"'The SB_GETTEXT message retrieves the text from the specified
'part of a status window.
'wParam = Zero-based index of the part from which to retrieve text.
'lParam = Pointer to the null-terminated string buffer that receives the text.
'Returns a 32-bit value that consists of two 16-bit values. The
'low word specifies the length, in characters, of the text. The high
'word specifies the type of operation used to draw the text. The
'type can be one of the following values:
' 0, SBT_NOBORDERS, SBT_POPOUT, SBT_RTLREADING
'If the text has the SBT_OWNERDRAW drawing type, this message
'returns the 32-bit value associated with the text instead of
'the length and operation type."
as i mentioned above, i thought that meant it was a pointer to a string... i'm not that used to working with those, but my functions that worked on pointers in previous projects do not work for these "pointers"... could this "32-bit value associated with the text" something other than a pointer? if so, how can i extract the string?