Resource Creation
DLL When creating a multi-language version of the software, it is very meaningful to make resource DLL of different languages and implement different language versions by switching the DLL. Generally, DLL starts from the dllmain () function. When creating a resource DLL, you can not use the dllmain () function. 1. Select Win32 dynameic ~ Link Library
2. Create an empty project and insert the resource. 3. Set the Project LINK option and set no entry function for the DLL, OK!
4. Usage: # include "../ResDLL/resource. H" Void crdlltestdlg: onbutton1 (){ Handle hdll; Hrsrc hres; Hexe = loadlibrary (".. // ResDLL. dll "); If (Hexe = NULL) { Afxmessagebox ("cocould not load DLL ."); } Char buff [1000] = "/0 "; Int r =: loadstring (struct hinstance _ *) hdll, ids_str, buff, 255 ); Afxmessagebox (buff ); // Clean up. If (! Freelibrary (struct hinstance _ *) hdll )) { Afxmessagebox ("cocould not free DLL ."); } }