Jump to content

GuiSendMsg question

Recommended Posts

EDIT: Ignore this. I am an idiot; I reversed the parameters :D

Does GuiSendMsg support messages where the lParam is a "pointer to the null-terminated string" ? [MS docs http://msdn.microsoft.com/library/default...._findstring.asp ]

I can't get LB_FINDSTRING to work.... Here's some test code:

Global $NULL
Global $LB_FINDSTRING = 0x18F;

; Search for first item that begins with $string; find will wrap around if read end of listbox; index -1 should start listbox from beginning
Func _GuiLB_FindString($ref, $string, $startIndex)
   Return GuiSendMsg($ref, $LB_FINDSTRING, $startIndex, $string)

Opt("GUINotifyMode", 1)
GuiCreate("Wrapper Test")
$list_1 = GUISetControl("list", "List 1", 20, 30, 140, 230)
   GUISetControlData($list_1, "one|two|three|four|")
$button_1 = GUISetControl("button", "List contents", 180, 40, 170, 50)

While 1
    $msg = GuiMsg(0)
    Case $msg = -3
     Case $msg = $button_1
        $foo = _GuiLB_FindString($list_1, 1, "th")
        MsgBox(4096,"test", $foo)
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...