Alright, I have a .png I want to load into a .dll so it will show up when I inject it into a game. How can I load a .png?
Printable View
Alright, I have a .png I want to load into a .dll so it will show up when I inject it into a game. How can I load a .png?
To display a PNG file in dialog box, do the following in the OnPaintQuote:
Originally Posted by Rehorav
function of the dialog. Have a CStatic control in the dialog where the file
is to be displayed.
Code:.h file
CStatic m_Pic
Edit :Have you tried GDI+Code:.cpp file
OnPaint(...)
{
...
CPaintDC dc(CWnd::FromHandle(m_Pic.m_hWnd));
CGdiplusPicture pic;
pic.LoadPicture(strPathToPNGFile);
pic.Render(dc.GetSafeHdc(), rcRender, 0L);
....
}
Well, I need to load the .png, like stored as a resource, and be able to place it in co-ords X,Y. Its not in a dialog box, but I'm injecting the .dll into a game and I want to have the .png display when its injected.
Your .dll has already been ready for your case ??
You just wanna realize loading your .png file by using .dll to inject into a game , right ????
If I have not understand your case yet , pls. attach your project with zip format here .
Hi,
You can use either GDI+ as mentioned by jayender.vs or you can take a
look at a free open source library called CxImage if you need to do raw
processing of the image data.
If you need to load a png from your resource file, it's a little more involved but you can do it with GDI+. Let me know if you want me to post some code.