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

C / C++ / MFC

 
QuestionSuppressing the "Missing Picture Dialog - Warning Message " Pin
sivakarthick17-Apr-07 20:23
sivakarthick17-Apr-07 20:23 
QuestionWindows Socket Link error Pin
Syamlal S Nair17-Apr-07 20:16
Syamlal S Nair17-Apr-07 20:16 
AnswerRe: Windows Socket Link error Pin
Programm3r17-Apr-07 20:20
Programm3r17-Apr-07 20:20 
GeneralRe: Windows Socket Link error Pin
Syamlal S Nair17-Apr-07 20:26
Syamlal S Nair17-Apr-07 20:26 
GeneralRe: Windows Socket Link error Pin
Programm3r17-Apr-07 20:30
Programm3r17-Apr-07 20:30 
AnswerRe: Windows Socket Link error Pin
Paresh Chitte17-Apr-07 20:20
Paresh Chitte17-Apr-07 20:20 
AnswerRe: Windows Socket Link error Pin
prasad_som17-Apr-07 20:21
prasad_som17-Apr-07 20:21 
QuestionWin32 GUI Components Pin
Programm3r17-Apr-07 20:15
Programm3r17-Apr-07 20:15 
Hi all,

I have created a WIN32 Console application and I have added a resouce to it: IDD_DIALOG. On the dialog I put a button (IDC_BUTTON1). So I used the create class wizzard of VS2005 to create a .h and .cpp files for the IDC_BUTTON1.
It generated the following:
Header File:
#pragma once

// btnClick dialog

class btnClick : public CDialog
{
	DECLARE_DYNAMIC(btnClick)

public:
	btnClick(CWnd* pParent = NULL);   // standard constructor
	virtual ~btnClick();

// Dialog Data
	enum { IDD = IDD_DIALOG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedButton();
};


CPP File:
// btnClick.cpp : implementation file
//

#include "stdafx.h"
#include "btnClick.h"


// btnClick dialog

IMPLEMENT_DYNAMIC(btnClick, CDialog)

btnClick::btnClick(CWnd* pParent /*=NULL*/)
	: CDialog(btnClick::IDD, pParent)
{

}

btnClick::~btnClick()
{
}

void btnClick::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(btnClick, CDialog)
	ON_BN_CLICKED(IDC_BUTTON1, &btnClick::OnBnClickedButton)
END_MESSAGE_MAP()


// btnClick message handlers

void btnClick::OnBnClickedButton()
{
	// TODO: Add your control notification handler code here
	MessageBox("Hallo", "Test", MB_OK);
}


But When I run the project I receive the following errors:
error C2065: 'IDD_DIALOG' : undeclared identifier
error C2065: 'IDC_BUTTON1' : undeclared identifier

So I add #include "resource.h" to the header file.
But then I receive the following error:

error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj) nafxcwd.lib
fatal error LNK1169: one or more multiply defined symbols found

Can someone please help me ??
Many Thanks.
Regards,
(Sigh | :sigh: I'm very new to MFCSigh | :sigh: )



The only programmers that are better than C programmers are those who code in 1's and 0's..... Smile | :)

Smile | :) Programm3r

My Blog: ^_^

AnswerRe: Win32 GUI Components Pin
Michael Dunn18-Apr-07 5:45
sitebuilderMichael Dunn18-Apr-07 5:45 
QuestionLinked List Pin
Cmania17-Apr-07 19:45
Cmania17-Apr-07 19:45 
AnswerRe: Linked List Pin
Michael Dunn18-Apr-07 5:48
sitebuilderMichael Dunn18-Apr-07 5:48 
AnswerRe: Linked List Pin
Blake Miller18-Apr-07 8:38
Blake Miller18-Apr-07 8:38 
QuestionCalling Conventions Demystified Pin
Cmania17-Apr-07 19:28
Cmania17-Apr-07 19:28 
AnswerRe: Calling Conventions Demystified Pin
Daniel Grunwald17-Apr-07 23:11
Daniel Grunwald17-Apr-07 23:11 
Questionhow to load gif image under winCE?? Pin
goolie8317-Apr-07 19:00
goolie8317-Apr-07 19:00 
AnswerRe: how to load gif image under winCE?? Pin
Dmitry Khudorozhkov17-Apr-07 19:51
Dmitry Khudorozhkov17-Apr-07 19:51 
GeneralRe: how to load gif image under winCE?? Pin
goolie8317-Apr-07 20:21
goolie8317-Apr-07 20:21 
GeneralRe: how to load gif image under winCE?? Pin
Dmitry Khudorozhkov17-Apr-07 20:56
Dmitry Khudorozhkov17-Apr-07 20:56 
GeneralRe: how to load gif image under winCE?? Pin
goolie8317-Apr-07 21:51
goolie8317-Apr-07 21:51 
GeneralRe: how to load gif image under winCE?? Pin
Dmitry Khudorozhkov18-Apr-07 1:52
Dmitry Khudorozhkov18-Apr-07 1:52 
GeneralRe: how to load gif image under winCE?? Pin
goolie8318-Apr-07 16:46
goolie8318-Apr-07 16:46 
Questioncan these code fragments lead to a memory leak Pin
jossion17-Apr-07 18:38
jossion17-Apr-07 18:38 
AnswerRe: can these code fragments lead to a memory leak Pin
Stephen Hewitt17-Apr-07 18:42
Stephen Hewitt17-Apr-07 18:42 
AnswerRe: can these code fragments lead to a memory leak Pin
StevenWh17-Apr-07 20:06
StevenWh17-Apr-07 20:06 
QuestionHow to parse a file and to create a tree view from it??? Pin
syampj17-Apr-07 18:34
syampj17-Apr-07 18:34 

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.