V
Victor
Hi everybody!
I am just trying to switch from C++ 6 to the C++.NET and face an
immediate problem I cannot tackle. Please help!
I created a new VC++ standard SDI project in the Visual Studio .NET
2003. Now I want to have a bitmap on the background of the mainframe
window. So, I added to the MyAppView.h the following :
#include <gdiplus.h>
using namespace Gdiplus;
and to the definition of the class CMyAppView added a new member -
Bitmap* bm.
Now I am going to instantiate this member within the constructor
CMyAppView, creating a bitmap from a file, say "a.bmp".
bm = new Bitmap( ... ? ... ) -- and here is my problem...
I found in the MSDN a Bitmap constructor Bitmap(String* fileName) and
think that will be a proper one in my case.
But what type is that misterious String ? If I declare a local variable
String bmString within the CMyAppView constructor (in
the CMyAppView.cpp), the compiler laments the type 'String' is unknown.
The old good type 'string' (needs for implementation #include <string>
and using namespace std is not the one needed by the Bitmap
constructor. When I try to declare System::String, I have even more
problems, because the namespace System does not allegedly exist...
What is wrong ?
Many thanks in advance.
I am just trying to switch from C++ 6 to the C++.NET and face an
immediate problem I cannot tackle. Please help!
I created a new VC++ standard SDI project in the Visual Studio .NET
2003. Now I want to have a bitmap on the background of the mainframe
window. So, I added to the MyAppView.h the following :
#include <gdiplus.h>
using namespace Gdiplus;
and to the definition of the class CMyAppView added a new member -
Bitmap* bm.
Now I am going to instantiate this member within the constructor
CMyAppView, creating a bitmap from a file, say "a.bmp".
bm = new Bitmap( ... ? ... ) -- and here is my problem...
I found in the MSDN a Bitmap constructor Bitmap(String* fileName) and
think that will be a proper one in my case.
But what type is that misterious String ? If I declare a local variable
String bmString within the CMyAppView constructor (in
the CMyAppView.cpp), the compiler laments the type 'String' is unknown.
The old good type 'string' (needs for implementation #include <string>
and using namespace std is not the one needed by the Bitmap
constructor. When I try to declare System::String, I have even more
problems, because the namespace System does not allegedly exist...
What is wrong ?
Many thanks in advance.