TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Graeme Geldenhuys
date: 1996-07-05 17:08:46
subject: Dropdown List Box info needed...

Hello All!

I am fairly new to OS/2 PM programming, and was wondering if someone could
help shedd some light on this subject for me.

I created an array with 3 values in it..

CHAR szSource[3][15] = {"Compact Disk","Tape","Radio"};

I then sent this info to a dropdown list box with the following commands..

  for(i=0;i<3;i++)
    WinSendDlgItemMsg (hWnd, IDC_SOURCE, LM_INSERTITEM, (MPARAM)LIT_END,
       szSource[i]);

This worked fine as far as I know...  If I now click on the downarrow next
to the list box, it displays the three options to me.  If I done it the
correct way, I got no idea...  :-)

Well, my problem now is, I don't know how to find out what option the user
has selected from the list.  How do I get that info from the program...?

The ID for the dropdown list box is IDC_SOURCE.

Also when I open the dialog box, it doesn't display an initial value in the
list box, you must always click on the downarrow first to see the options,
before it displays anything.  How can I overcome that, so that it displays
the first option in the array as default when I open the dialog.

Hope you can figure out what I meant here...  Many thanks in advance.

   Cheers,
      Graeme
-=[Team OS/2 : South Africa]=-


... Modem Police...we clocked you at over 1600 cps.
--- GoldED/2 3.00.Alpha1+
* Origin: * Live Wire BBS * Somerset West * RSA * (5:7102/128)
SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 517 628 713/888 800/1
@PATH: 7102/128 111 7104/2 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.