--- In [email protected], "Sheri" <[EMAIL PROTECTED]> wrote:
>
> I'm having some trouble with this.
> 
> I have the handle h to a program's status bar. This message correctly
> returns the number of parts it has:
> 
> local NumberOfPanels = win.SendMessage(h, SB_GETPARTS, 0, 0)
> 
> this message correctly returns the number of characters in zero-based
> part 2 of the status bar:
> 
> local size = win.SendMessage(h, SB_GETTEXTLENGTH, 2, 0)
> 
> So now I want the text of part 2.
> 
> I tried this:
> local sbtext=repeat("x", size)
> win.SendMessagestr(h,SB_GETTEXT,2,sbtext)

Haven't tried it myself, but try  

  sbtext=repeat("x", size+1)

you have to allow enough room for the closing null.  In fact, go mad:

  sbtext=repeat("x", size*2)

I should probably add variants of get_value and set_value to dialog
plugin that work with status bars.  Next week maybe.


Reply via email to