Hi, I'm developing a in process COM server to add prooperty pages to Active Directory. i'm using V.S. 2005's C++ with only the standard library.
When I create the GUI resource file for the property page, there is only standard listbox availble in the Toolbox. I know that checkedListBox is availble if I were developing a window application using VC++ from the toolbox. Does anyone know how I can get that added to my toolbox for this project
Thanks.

How can I get the CheckedListBox for a Com project?
Pansar_Nisse
MikePHall
Read the docs please.
LVM_INSERTITEM needs a LVITEM struct!
Kyle J Wakefield
Create a normal Listbox and subclass the ListBox with CCheckListBox. There is no plain control for a checked listbox. AFAIK the listbox style must be owner drawn variable.
Sharrukin
dangrig
AFAIK= As Far As I Know.
I have no such control in my toolbox.
Before I can give you further hints: Are you using managed C++ or C++/CLI or native Win32 programming (ATL/MFC)
rahvyn6
Brad Huffman
Pablo Alarcon Garcia
G Jovan
Reggie Chen
I'm using unmanaged C++ and only Win C++ standard library. This is because the ext. property sheets that I'm developing for Active Directory has to run on Win 2000 server and it only takes MMC 1.2 and my V.S. 2005 and .net Framework 2.0 won't work directly with that (sigh...). I thought about and tried using COM interop but there's not enough information on the internet or examples so I gave up after 2 weeks and go back to using C++.
Cheers.
Arthur Dzhelali
Chris TBerry
Oh, that's great! Thank you.
I founda ListView control by right click on my Toolbox and select the choose an item. I clicked on the COM tab and added a ListView control and am now coding to send it the Checkbox style. I hope this work. If not then I'll use the list contol. Thank you very much for your help.
Fury Libre
Hi Martin,
I inserted the List Control onto my Dialog and then sent the following message to add item but it's not working. Are you sure the List Control is the same as List View Thanks.
_bstr_t contextName(bstr);
LPCWSTR lpcContext = contextName;
wchar_t *wContext = contextName.operator wchar_t *();::MessageBox(NULL, lpcContext, L
"lpcContext; Unity - PopulateCheckedListBox", MB_OK); const char* contexts = contextName.operator const char *(); //ListView_InsertItem(hwndListView, LPTSTR pszText) //lResult = SendDlgItemMessage(hwndDlg, IDC_LIST_CONTEXTS, LVM_INSERTITEM ,-1,(LPARAM)(contexts));lResult = SendDlgItemMessage(hwndDlg, IDC_LIST_CONTEXTS, LVM_INSERTITEM ,-1,(LPARAM)(LPCSTR)(wContext));
if(lResult <= 0){
DisplayError( hResult, L
"Fail to insert context into listview.; Unity - PopulateCheckedListBox" );hResult = E_FAIL;
//goto Cleanup;}
//end if(lResult <= 0)