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)

and the status bar's program displays an error reporting an access
violation in commctl32.dll. The sbtext variable is unchanged.

ditto with this:
win.SendMessagestr(h,SB_GETTEXT,2,"sbtext")

These are the variables:
local WM_USER =  0x0400
local SB_GETPARTS = WM_USER + 6
local SB_GETTEXTLENGTH = WM_USER + 3
local sb_gettext = WM_USER + 2

Help?

Thanks,
Sheri


Reply via email to