I’m working on a piece of code that interacts with Resources (Executables) however i’m currently having a few issues.
Issue 1
In the Resource Header File (resource1.h), ID_EXEC is defined to a number however when I use the function “MAKEINTRESOURCE()” and use ID_EXEC as the parameter, ID_EXEC is apparently an undeclared identifier, How can I fix this?
Issue 2
The first parameter in FindResource() requires a HMODULE, however I don’t know how to get the HMODULE of the executable (Stored within the EXE), How can I get the HMODULE?
Any help will be appreciated.
1) Surely your forgot
#include "resource1.h"2) It is the value of the first argument that got passed to WinMain(), cast to HMODULE. If you only have a main() or don’t have ready access to the variable then you can use GetModuleHandle(NULL).