• Advertisement

Archived

This topic is now archived and is closed to further replies.

List Control Box

This topic is 6042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello ; May be it''s not really the good place for this message by i''m in real need for help. In an app, created in Visual C++ 6 whitout using MFC, i have a dialog box with : a list box a list control. I add item to the list box with : SendDlgItemMessage(hDlg,IDC_MODELE,LB_ADDSTRING,0,(LPARAM) nom); I can´t use this command with the List Control, seems that the LB_ADDSTRING message is only for List Box (LB) but i can´t find the right message for the List Control. I need a List Control because i want to have multi choici options. Thanks for help Daniel Diligent

Share this post


Link to post
Share on other sites
Advertisement
You need to read up on the List-View Control, one of the Windows Common Controls, at;
  • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/CommCtls/ListView/ListView.asp
It has a completely different set of control and notification messages. The control message to insert an item is LVM_INSERTITEM.

BTW: A list box is quite capable of handling multiple selections. Just use the LBS_MULTIPLESEL style.

Edited by - LlelanD on August 9, 2001 11:11:12 AM

Share this post


Link to post
Share on other sites
Hello ;

I try to set the style this way but it doesn''t work :
SendDlgItemMessage(hDlg, IDC_MODELE, LBS_MULTIPLESEL , 0, 0);

I''m gonna get crazy with the MSDN help in Visual C++.

Daniel Diligent

Share this post


Link to post
Share on other sites

  • Advertisement