Results 1 to 2 of 2

Thread: LB_SETSEL problem in ThunderRT6ListBox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Posts
    79

    LB_SETSEL problem in ThunderRT6ListBox

    I have a program that attempts to select items in very large list box. In the program it interfaces with, there are two list boxes, both ThunderRT6ListBox's. The one on the right works perfectly, I send LB_SETSEL to it with
    Code:
    Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Short, ByVal lParam As Integer) As Integer
    to it and it selects/deselects items in the list as I desire. The one on the right, which seems identical in every way, fails to respond to my messages. I am 100% sure the hWnd is right, etc.

    Does anyone know of any possible reasons why the list box would fail to respond to my API commands? When I monitor the API msgs in Spy++ it shows it receives the message but just returns LB_ERR.

    The same exact call (with the proper hWnd) works on the listbox right next to it.
    Last edited by JohnVM; Mar 28th, 2004 at 12:02 PM.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Posts
    79
    It appears the problem was that it was a single selection list box, therefore it would not allow the LB_SETSEL.

    I tried LB_SETCURSEL and it worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width