Home > Software engineering >  Consult a vs2019 problem
Consult a vs2019 problem

Time:11-08

I just started to learn, please write a lib library or DLL, which USES an image, added with the method of the resource file, so the lib or DLL for others can not take this picture? There is only a DLL or lib, I tried it on as if no, how can achieve? To embed images such as what?

CodePudding user response:

Embedded into the resources

CodePudding user response:

Added directly - resources - import, import resources according to the type of distribution resource id, and then used in the code:
 HRSRC hR=FindResource (hInstance, MAKEINTRESOURCE (IDR_JPG2), L "JPG"); 
DWORD dwSize=SizeofResource (hInstance, hR);
HGLOBAL hG=LoadResource (hInstance, hR);

CodePudding user response:


Description is clear,
Do you want to embedded resource, picture?
By inserting resources can also,
Another method is bin2h is the export array header files, resource links into the program, you can directly use the array buff.
  • Related