marco.inblu
18-12-2007, 14:48
Salve ragazzi,
sono ancora io ... quello del primo scoglio...
Ho da poco scritto riguardo ad un problemino on C++ ed adesso sono alle prese con VC++ (2005).
Il programmino è semplicissimo ma al solito le mie conoscienze mi bloccano alla prima difficoltà....
Vi posto il programma che non fa altro che far comparire una finestra vuota.
Il programma è scritto in un solo file (Exercise.cpp) per semplificare il tutto ed è il seguente:
#include <afxwin.h>
class CExerciseApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
class CMainFrame : public CFrameWnd
{
public:
CMainFrame();
};
CMainFrame::CMainFrame()
{
Create(NULL, "MFC Fundamentals");
}
BOOL CExerciseApp::InitInstance()
{
m_pMainWnd = new CMainFrame;
m_pMainWnd->ShowWindow(SW_NORMAL);
return TRUE;
}
CExerciseApp theApp;
L'errore che mi viene segnalato è:
------ Rebuild All started: Project: Project_Start, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'Project_Start', configuration 'Debug|Win32'
Compiling...
Exercise.cpp
WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
d:\vs2005\project_start\project_start\exercise.cpp(17) : error C2664: 'CFrameWnd::Create' : cannot convert parameter 2 from 'const char [17]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://d:\VS2005\Project_Start\Project_Start\Debug\BuildLog.htm"
Project_Start - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Nelle proprietà del progetto ho impostato l'uso dell' MFC.
Che mi sapete dire?
Grazie ancora
sono ancora io ... quello del primo scoglio...
Ho da poco scritto riguardo ad un problemino on C++ ed adesso sono alle prese con VC++ (2005).
Il programmino è semplicissimo ma al solito le mie conoscienze mi bloccano alla prima difficoltà....
Vi posto il programma che non fa altro che far comparire una finestra vuota.
Il programma è scritto in un solo file (Exercise.cpp) per semplificare il tutto ed è il seguente:
#include <afxwin.h>
class CExerciseApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
class CMainFrame : public CFrameWnd
{
public:
CMainFrame();
};
CMainFrame::CMainFrame()
{
Create(NULL, "MFC Fundamentals");
}
BOOL CExerciseApp::InitInstance()
{
m_pMainWnd = new CMainFrame;
m_pMainWnd->ShowWindow(SW_NORMAL);
return TRUE;
}
CExerciseApp theApp;
L'errore che mi viene segnalato è:
------ Rebuild All started: Project: Project_Start, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'Project_Start', configuration 'Debug|Win32'
Compiling...
Exercise.cpp
WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
d:\vs2005\project_start\project_start\exercise.cpp(17) : error C2664: 'CFrameWnd::Create' : cannot convert parameter 2 from 'const char [17]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://d:\VS2005\Project_Start\Project_Start\Debug\BuildLog.htm"
Project_Start - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Nelle proprietà del progetto ho impostato l'uso dell' MFC.
Che mi sapete dire?
Grazie ancora