problem with ... const char [10]' to 'LPCTSTR'

i am new to MFC programming, i have to create a simple GUI interface and was attempting a tutorial from a lecturer but it is not working...
it keeps coming up with an error -
'CFrameWnd::Create' : cannot convert parameter 2 from 'const char [10]' to 'LPCTSTR'

this is my code
[code]
//this is the file lab9.cpp
#include "C:Documents and SettingsAdministratorMy DocumentsMFClab9lab9.h"

//define our window constructor
COurWin::COurWin()
{
//Call CframWnd's creator() function
Create(NULL, "my_window");
}

BOOL COurApp::InitInstance()
{
m_pMainWnd = new COurWin;
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}

BEGIN_MESSAGE_MAP(COurWin, CFrameWnd)
END_MESSAGE_MAP()

COurApp App;
[/code]

this is my header file
[code]
// This is the file lab9.h
// Include standard windows functions and classes
#include
// We always derive classes from the main MFC classes
// Derive main window class

class COurWin:public CFrameWnd
{
// We shall want control over construction
public:
COurWin();

// We must declare the message map - no semi-colon
DECLARE_MESSAGE_MAP()
};

// Derive application class
class COurApp : public CWinApp
{
// We need to override InitInstance()
BOOL InitInstance();
};
[/code]

can anyone give any answers to why it is creating this error!!
and i would ask my lecturer but h is away for a week and i need this assignment started

cheers
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories