Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing icons and combobox entries

Status
Not open for further replies.

Maurader

Technical User
May 8, 2002
59
CA
Hi, I'm a newbie looking for help : )

I'm creating a MFC dll to be used by MasterCAM v9 software.

In my dialog box, I have a CListCtrl and a CComboBox. The List contains (or should contain) icons that I have created within MSVC, and are under the resources/icons folder. I am using

m_shape_image.Create (32, 32, 0, 0, 8);
icon[0] = AfxGetApp()->LoadIcon(IDI_RECTANGLE);

CListCtrl *list = (CListCtrl *) GetDlgItem (IDC_SHAPES);
list->SetImageList (&m_shape_image, LVSIL_SMALL);m_shape_image.Add (icon[0]);

to load the icons into the list. However, the icons do not appear! When I debug and step into the LoadIcon method, there is an error saying cannot evaluate expression. Are there specific directories that my .ico files have to be located in? or are there environment variables that I need to set?

Also, when I try to populate a combobox using

m_create.InsertString(0,"1 Point");

nothing appears in the box...any ideas?

thanks!
 
To use resources with a dll, You should explicitely link they to dll - on default, dlls in VC++ do not use resources.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top