In a dialog I had replaced an CListBox with CListCtrl ... the old CListBox had used SetItemDataPtr, to store a CMyObjects pointers ... but CListCtrl does not have not such a thing (CListCtrl::SetItemDataPtr, only CListCtrl::SetItemData) ... how can I store an object pointers into CListCtrl ? Is it posible ?
Thank you so much for your answers (both of you), I will try that right away and tell you what I've done ... but it came into my mind a question ... if I could store pointers into SetItemData(...), why CListBox does have SetItemData and SetItemDataPtr ... it is not a kind of redundancy ?
I can't see anything seriously wrong in the posted code. So the error may be also somewhere else (probably in a line before number 33 in mydialog.cpp). A possible error source is forgetting the trailing semicolon after the class declaration:
class CMyDialog : public CDialog
}; // <- Don't forget the semicolon here.
I have some more notes:
You should always use parentheses with definitions and macros:
Such mistakes happen (even to me after years of programming). When forgetting the semicolon at the end of a header file, the error is thrown at the first semicolon in the next file which might be another header file or the source file. If you remember this and get such a bulk of messages the next time, you will probably know where to look first.