www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - List Box

reply "Steve & Denise De Chellis" <dbouton snet.net> writes:
How do I populate a list box?

The only references I've seen have been with child windows. I've added a
list box to one of my dialogboxes but now I have no idea how to fill it. I
have no problem using SetDlgItem.

Steve
Mar 24 2002
parent "Roald Ribe" <rr teikom.no> writes:
Try

   // Add line into list box
   uiRetVal = (UINT)SendMessage(hLB, LB_ADDSTRING, (WPARAM)0,
              (LPARAM)(LPCSTR) &str[iLineStart]);

A little heavy on casting, because source is compiled for
both 16 and 32 bits. The other list box functions follows the same
pattern, look at messages in SDK doc starting with LB_

Roald


"Steve & Denise De Chellis" <dbouton snet.net> wrote in message
news:a7lu3b$1ap1$1 digitaldaemon.com...
 How do I populate a list box?

 The only references I've seen have been with child windows. I've added a
 list box to one of my dialogboxes but now I have no idea how to fill it. I
 have no problem using SetDlgItem.

 Steve
Mar 25 2002