Suvez ma vie d'etudient...

kateonoc Messages postés 3 Date d'inscription lundi 19 décembre 2005 Statut Membre Dernière intervention 26 mars 2006 - 26 mars 2006 à 23:10
kateonoc Messages postés 3 Date d'inscription lundi 19 décembre 2005 Statut Membre Dernière intervention 26 mars 2006 - 26 mars 2006 à 23:18
// Spell.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "Spell.h"
#include "SpellDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSpellApp

BEGIN_MESSAGE_MAP(CSpellApp, CWinApp)
//{{AFX_MSG_MAP(CSpellApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSpellApp construction

CSpellApp::CSpellApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CSpellApp object

CSpellApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CSpellApp initialization

BOOL CSpellApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CSpellDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}

// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}

ET VOICI L'erreur:
--------------------Configuration: DictionaryEditor - Win32 Debug--------------------
Compiling...
DictionaryEditor.cpp
d:\_max\new code sources\speller\copy of speller\spellchecker_dictedit_src\dictionaryeditor.cpp(57) : error C2065: 'Enable3dControlsStatic' : undeclared identifier
Error executing cl.exe.

DictionaryEditor.exe - 1 error(s), 0 warning(s)

Aide moi S'IL VOUS PLAIT,voici une programme que je dois refaire. je dois faire mon projet d'annee,comment on peut resoudre cette probleme?...je ne sais pas, s'il vous plait aide moi. Excuse moi svp si j'ai pose une question d'enfant. je suis novice.

2 réponses

kateonoc Messages postés 3 Date d'inscription lundi 19 décembre 2005 Statut Membre Dernière intervention 26 mars 2006
26 mars 2006 à 23:12
// DictionaryEditor.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "DictionaryEditor.h"

#include "MainFrm.h"
#include "DictionaryEditorDoc.h"
#include "DictionaryEditorView.h"



#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDictionaryEditorApp

BEGIN_MESSAGE_MAP(CDictionaryEditorApp, CWinApp)
//{{AFX_MSG_MAP(CDictionaryEditorApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDictionaryEditorApp construction

CDictionaryEditorApp::CDictionaryEditorApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CDictionaryEditorApp object

CDictionaryEditorApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CDictionaryEditorApp initialization

BOOL CDictionaryEditorApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.

Enable3dControlsStatic(); // Call this when linking to MFC statically

// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey("Peter Pearson");

LoadStdProfileSettings(); // Load standard INI file options (including MRU)

// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.

CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CDictionaryEditorDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CDictionaryEditorView));
AddDocTemplate(pDocTemplate);

// Enable DDE Execute open
EnableShellOpen();
RegisterShellFileTypes(TRUE);

// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);

// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;

// The one and only window has been initialized, so show and update it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();

// Enable drag/drop open
m_pMainWnd->DragAcceptFiles();

return TRUE;
}


/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
CAboutDlg();

// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA

// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
// No message handlers
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

// App command to run the dialog
void CDictionaryEditorApp::OnAppAbout()
{
CAboutDlg aboutDlg;
aboutDlg.DoModal();
}

/////////////////////////////////////////////////////////////////////////////
// CDictionaryEditorApp message handlers

--------------------Configuration: DictionaryEditor - Win32 Debug--------------------
Compiling...
DictionaryEditor.cpp
d:\_max\new code sources\speller\copy of speller\spellchecker_dictedit_src\dictionaryeditor.cpp(57) : error C2065: 'Enable3dControlsStatic' : undeclared identifier
Error executing cl.exe.

DictionaryEditor.exe - 1 error(s), 0 warning(s)

Comment resoudre?
0
kateonoc Messages postés 3 Date d'inscription lundi 19 décembre 2005 Statut Membre Dernière intervention 26 mars 2006
26 mars 2006 à 23:18
// Spell.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "Spell.h"
#include "SpellDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSpellApp

BEGIN_MESSAGE_MAP(CSpellApp, CWinApp)
//{{AFX_MSG_MAP(CSpellApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSpellApp construction

CSpellApp::CSpellApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CSpellApp object

CSpellApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CSpellApp initialization

BOOL CSpellApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CSpellDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}

// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
--------------------Configuration: Spell - Win32 Debug--------------------
Compiling...
Spell.cpp
Linking...
Spell.obj : error LNK2001: unresolved external symbol "public: __thiscall CSpellDlg::CSpellDlg(class CWnd *)" (??0CSpellDlg@@QAE@PAVCWnd@@@Z)
msvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/Spell.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

Spell.exe - 3 error(s), 0 warning(s)
0
Rejoignez-nous