List Control Box

Started by
2 comments, last by Diligent 22 years, 8 months ago
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
Daniel Diligent
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
Thanks for help, i test it tomorrow (too tired today ).

Daniel Diligent
Daniel Diligent
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
Daniel Diligent

This topic is closed to new replies.

Advertisement