Click here to Skip to main content
15,890,408 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
new Gdiplus::Bitmap return NULL,detail is as follows(from stackoverflow):

I was using the GDI object in DLL,new gdiplus::bitmap in DLL returned null,but new other object succeeded. I used GdiplusStartup(&gdiplusToken, gdiplusStartupInput, NULL) to initialize.
The code is like:
C++
GdiplusStartup(&gdiplusToken, gdiplusStartupInput, NULL);
 ... 
Gdiplus::Bitmap *bmp = new Gdiplus::Bitmap(bmp_info.bmWidth, bmp_info.bmHeight, PixelFormat32bppARGB);



is there any GDI initialization work or initialzation work missed or other question.
HELP me!!!!!!!!!!!!!
Posted
Updated 20-Mar-13 21:20pm
v3

1 solution

Solved. I initialized in the DLLMain entry at the beginning. Now I changed the initialization to the function using the GDI Object.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900