views:

108

answers:

2

Hello all i have simple app that i try to compile with VC express and using the :
microsoft platform sdk for windows server 2003 that contains mfc and atl
now i have this simple code :

CString strValue("test");
CString s = strValue.Trim();
LPCTSTR lpStr = (LPCTSTR)strValue.Trim()

that give me compilation error : c:\dev\test.cpp(463) : error C2039: 'Trim' : is not a member of 'CString' c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afx.h(369) : see declaration of 'CString'

do i have problem with the platform sdk and vc express ?

+3  A: 

Visual C++ Express Edition don't has built in support for ATL and MFC (CString is an MFC class, implemented as the shared MFC/ATL CStringT class: documentation).

If you really can't afford the Standard Edition, you can rely on this howto to add ATL and MFC support by installing the DDK: http://www.codeproject.com/KB/MFC/MFCinVisualStudioExpress.aspx

Lorenzo
Thanks , but Microsoft doesn't have this version to download any more where can i find it?
You can download the **trial** of Visual Studio 2010 Professional or Ultimate: http://www.microsoft.com/visualstudio/en-us/download
Lorenzo
To download current versions of WDK you have to register on https://connect.microsoft.com and enroll the Windows Driver Kit program (it is free).
Lorenzo
does the new ddk has mfc/atl?
+1  A: 

You could try TrimLeft(), TrimRight() functions of CString instead.

Sunscreen