Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSOLVED - Passing CObject to OnUpdate - compiler error C2039 [modified] Pin
Vaclav_16-May-08 6:12
Vaclav_16-May-08 6:12 
AnswerRe: Passing CObject to OnUpdate - compiler error C2039 Pin
mid=574116-May-08 6:49
mid=574116-May-08 6:49 
GeneralRe: Passing CObject to OnUpdate - compiler error C2039 Pin
Kelly Herald16-May-08 6:52
Kelly Herald16-May-08 6:52 
AnswerRe: Passing CObject to OnUpdate - compiler error C2039 Pin
Kelly Herald16-May-08 6:50
Kelly Herald16-May-08 6:50 
GeneralRe: Passing CObject to OnUpdate - compiler error C2039 Pin
Vaclav_16-May-08 7:01
Vaclav_16-May-08 7:01 
QuestionDo any body know the encoding formate of .rc file in VS 2005? Pin
sumit.durg16-May-08 5:19
sumit.durg16-May-08 5:19 
AnswerRe: Do any body know the encoding formate of .rc file in VS 2005? Pin
mid=574116-May-08 6:46
mid=574116-May-08 6:46 
QuestionError adding a string to a DropList Pin
piul16-May-08 5:13
piul16-May-08 5:13 
Hi all,

I have a simple dialog with a combo box control, of the Drop-List type.
class CDlg : public CDialog
{
	DECLARE_DYNAMIC(CDlg)
public:
	CDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlg();
	void AddOpc()	;
	enum { IDD = IDD_DIALOG1 };
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	CComboBox m_cbDropList;
};

void CDlg::AddOpc()
{
	CString csOpc	;
	csOpc = "1st option"	;
	m_cbDropList.AddString("1st option")	;      //THIS LINE CAUSES A DEBUG ASSERTION
}

And the line in which a string is added makes the program crash.
Any idea??
AnswerRe: Error adding a string to a DropList Pin
toxcct16-May-08 5:19
toxcct16-May-08 5:19 
GeneralRe: Error adding a string to a DropList Pin
piul16-May-08 5:25
piul16-May-08 5:25 
QuestionRe: Error adding a string to a DropList Pin
CPallini16-May-08 5:24
mveCPallini16-May-08 5:24 
AnswerRe: Error adding a string to a DropList Pin
piul16-May-08 5:26
piul16-May-08 5:26 
GeneralRe: Error adding a string to a DropList Pin
CPallini16-May-08 5:29
mveCPallini16-May-08 5:29 
QuestionRe: Error adding a string to a DropList Pin
piul16-May-08 5:40
piul16-May-08 5:40 
AnswerRe: Error adding a string to a DropList Pin
CPallini16-May-08 5:49
mveCPallini16-May-08 5:49 
GeneralRe: Error adding a string to a DropList Pin
piul16-May-08 5:51
piul16-May-08 5:51 
AnswerRe: Error adding a string to a DropList Pin
piul16-May-08 5:28
piul16-May-08 5:28 
GeneralRe: Error adding a string to a DropList Pin
krmed16-May-08 5:40
krmed16-May-08 5:40 
GeneralRe: Error adding a string to a DropList Pin
piul16-May-08 5:42
piul16-May-08 5:42 
GeneralRe: Error adding a string to a DropList Pin
toxcct16-May-08 7:11
toxcct16-May-08 7:11 
GeneralRe: Error adding a string to a DropList Pin
CPallini16-May-08 5:44
mveCPallini16-May-08 5:44 
GeneralRe: Error adding a string to a DropList Pin
piul16-May-08 5:48
piul16-May-08 5:48 
GeneralRe: Error adding a string to a DropList Pin
CPallini16-May-08 6:02
mveCPallini16-May-08 6:02 
AnswerRe: Error adding a string to a DropList Pin
piul16-May-08 5:45
piul16-May-08 5:45 
Questionsheet and 3d page(vc++ 2005) Pin
akira3216-May-08 4:40
akira3216-May-08 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.