get count in listbox

This is a discussion on get count in listbox within the Windows Programming forums, part of the Platform Specific Boards category; i have programming windows from the ground up and the book lists some listbox messages to send to it, and ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    157

    get count in listbox

    i have programming windows from the ground up and the book lists some listbox messages to send to it, and i want to get the number of strings in the listbox. so i'm going to send the message to the listbox and the message is LB_GETCOUNT. but, the book only tells me the message, not what i should set the WPARAM and LPARAM to. what do i need to set them to in the SendMessage function?

    thanks!

  2. #2
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Both should be 0. SendMessage will return the number of elements or LB_ERR.

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    157
    okay, thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. bintree and count (withouth using template)?
    By cubimongoloid in forum C++ Programming
    Replies: 7
    Last Post: 05-24-2009, 06:22 AM
  2. input question
    By piyush_v in forum C Programming
    Replies: 9
    Last Post: 04-12-2007, 07:09 AM
  3. Program Crashing
    By Pressure in forum C Programming
    Replies: 3
    Last Post: 04-18-2005, 10:28 PM
  4. How to cast a ListBox item to an int for a switch statment?
    By Swaine777 in forum C++ Programming
    Replies: 8
    Last Post: 09-26-2004, 08:52 PM
  5. Getting FULL filename from listbox
    By Garfield in forum Windows Programming
    Replies: 8
    Last Post: 01-27-2002, 07:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21