have the below code am using vs2005 mfc project, can add to edit box and set radio buttons but cannot see how to add the data to the listbox have been searching the web but they just give solutions that just do not exist in the intellisence text any ideas of how to do this on initialization
thanks for that i throws up a
c:\c++ aab using visual c++\add list box 2\add list box 2.cpp(68): error C2039: 'AddString' : is not a member of 'ATL::CStringT<BaseType,StringTraits>'
guess i am missing a header file but cannot find what it is any ideas
Zoppo
Hm - maybe I did something wrong ...
I assumed LBlistbox is a member of CSdialog and declared as a CListBox, but from the error you posted it seems it is declared as a CString - in this case my code can't work as it is, you either should change it in a way LBlistbox is declared as a CListBox and bound to the list box via DDX_Control, the other possibility is to retrieve a pointer to the control using GetDlgItem wherever you need it, i.e.:
I myself prefer the first, because it's easy to do using ClassWizard and there's no need for ugly (because not type-safe) casting from CWnd* to CListBox*.
ZOPPO
sydneyguy
ASKER
as you suggested set the dialog box to CListBox the below loaded all ok but the data does not display
how do i refresh the screen please
c:\c++ aab using visual c++\add list box 2\add list box 2.cpp(68): error C2039: 'AddString' : is not a member of 'ATL::CStringT<BaseType,St
guess i am missing a header file but cannot find what it is any ideas