using mfc in .net2003

hi all,

i am new to MFC programming. rite now i have started reading mfc programming book by jeff prosise. I have .net2003 with me. Now i am starting my application with following steps

1. select win32 application from the project selection option

2. in application setting i check mark empty project tag

3. i change the project setting to "use mfc in shared dll "

Now i copied the source code to .h and .cpp file and excuted it. but it is giving me the following errors

c:\Documents and Settings\kunal\My Documents\Visual Studio Projects\mfc examples\s1234\s1.cpp(39): error C3209: ' DT_CENTER' : Unicode identifiers are not yet supported

c:\Documents and Settings\kunal\My Documents\Visual Studio Projects\mfc examples\s1234\s1.cpp(39): error C3209: ' DT_VCENTER' : Unicode identifiers are not yet supported

c:\Documents and Settings\kunal\My Documents\Visual Studio Projects\mfc examples\s1234\s1.cpp(39): error C2146: syntax error : missing ')' before identifier ' DT_CENTER'

c:\Documents and Settings\kunal\My Documents\Visual Studio Projects\mfc examples\s1234\s1.cpp(39): error C2059: syntax error : ')'

i am not able to interpret the errors. please help me out of it. I guess i m not starting the application properly because code is correct(i just copy pasted from book)

Thanks

kunal s pate

[1416 byte] By [ku19832001] at [2007-12-20]
# 1

i m sorry i didnt post the code for reference. here is the code for reference

Hello.h file

class CMyApp : public CWinApp

{

public:

virtual BOOL InitInstance ();

};

class CMainWindow : public CFrameWnd

{

public:

CMainWindow ();

protected:

afx_msg void OnPaint ();

DECLARE_MESSAGE_MAP ()

};

hello.cpp file

#include <afxwin.h>

#include "Hello.h"

CMyApp myApp;

/////////////////////////////////////////////////////////////////////////

// CMyApp member functions

BOOL CMyApp::InitInstance ()

{

m_pMainWnd = new CMainWindow;

m_pMainWnd->ShowWindow (m_nCmdShow);

m_pMainWnd->UpdateWindow ();

return TRUE;

}

/////////////////////////////////////////////////////////////////////////

// CMainWindow message map and member functions

BEGIN_MESSAGE_MAP (CMainWindow, CFrameWnd)

ON_WM_PAINT ()

END_MESSAGE_MAP ()

CMainWindow::CMainWindow ()

{

Create (NULL, _T ("The Hello Application"));

}

void CMainWindow::OnPaint ()

{

CPaintDC dc (this);

CRect rect;

GetClientRect (&rect);

dc.DrawText (_T ("Hello, MFC"), -1, &rect,

DT_SINGLELINE | DT_CENTER | DT_VCENTER);

}

ku19832001 at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 2

Mabe your | character is wrong.

DT_SINGLELINE | DT_CENTER | DT_VCENTER

seams to be different from the one I use, even in the same font:

DT_SINGLELINE | DT_CENTER | DT_VCENTER

MartinRichter at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ Language...