V
Vamsi
Hello,
I am working in VC++ environment.while using gdi+, i want to use a
public member variable of Bitmap. which needs to be initialized at the
time of creation. and i m using this gdi+ in a Dll application. i am
trying to initialize the bitmap object at the constructor. like
Bitmap m-bmpobj; // Bitmap Obj which is a private member of the
TextEffect Class
// TextEffect is the Class name.
CTextEffect::CTextEffect(LPUNKNOWN pUnk, HRESULT *phr)
:bitmap(L"C:\\logo1.bmp")
{
// initializing width and height mem var.
m_nWidth=0;
m_nHeight=0;
}
but the application is not initializing the bitmap with the given file.
because before using gdi+ classes we need to initialize the Gdiplus in
our application with the following two statements.
// Initializing gdi+
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
Gdiplus::GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL);
So, these two statements are to processed before the constructor gets
called. But the constructor is the first function which gets called
when the dll is used.
So Please provide some tips and help to solve this problem.
Waiting for ur reply soon.
vamsi
I am working in VC++ environment.while using gdi+, i want to use a
public member variable of Bitmap. which needs to be initialized at the
time of creation. and i m using this gdi+ in a Dll application. i am
trying to initialize the bitmap object at the constructor. like
Bitmap m-bmpobj; // Bitmap Obj which is a private member of the
TextEffect Class
// TextEffect is the Class name.
CTextEffect::CTextEffect(LPUNKNOWN pUnk, HRESULT *phr)
:bitmap(L"C:\\logo1.bmp")
{
// initializing width and height mem var.
m_nWidth=0;
m_nHeight=0;
}
but the application is not initializing the bitmap with the given file.
because before using gdi+ classes we need to initialize the Gdiplus in
our application with the following two statements.
// Initializing gdi+
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
Gdiplus::GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL);
So, these two statements are to processed before the constructor gets
called. But the constructor is the first function which gets called
when the dll is used.
So Please provide some tips and help to solve this problem.
Waiting for ur reply soon.
vamsi