xeno33
March 28th, 2005, 07:06 PM
Hi all,
i'm currently using GDI+ with VC++ 6. Previously i was compiling in unicode but now i need to compile in the normal Win 32 Debug mode.
An error occured while compiling the construction of my Bitmap object:
// Contruct a Bitmap object based on a file
Bitmap bitmap(strFilePath);
strFilePath is my function parameter of type CString.
The error was:
error C2664: '__thiscall Gdiplus::Bitmap::Gdiplus::Bitmap(const unsigned short *,int)' : cannot convert parameter 1 from 'class CString' to 'const unsigned short *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
The syntax for the constructor that i'm using is :
Bitmap (const WCHAR *filename, BOOL useIcm);
The second parameter is optional and i do not require it's use.
Any way to solve this? Or do i have to use another constructor because WCHAR is a unicode type?
Appreciate any help or comments on the matter. :)
i'm currently using GDI+ with VC++ 6. Previously i was compiling in unicode but now i need to compile in the normal Win 32 Debug mode.
An error occured while compiling the construction of my Bitmap object:
// Contruct a Bitmap object based on a file
Bitmap bitmap(strFilePath);
strFilePath is my function parameter of type CString.
The error was:
error C2664: '__thiscall Gdiplus::Bitmap::Gdiplus::Bitmap(const unsigned short *,int)' : cannot convert parameter 1 from 'class CString' to 'const unsigned short *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
The syntax for the constructor that i'm using is :
Bitmap (const WCHAR *filename, BOOL useIcm);
The second parameter is optional and i do not require it's use.
Any way to solve this? Or do i have to use another constructor because WCHAR is a unicode type?
Appreciate any help or comments on the matter. :)