Loading an image from a resource embedded in a dll
问题 I'm developing a browser plugin (npapi) using FireBreath, and in it I'm trying to embed images which I need to load at runtime. I've been search, reading and experimenting for two days now but I can't seem to make it work. This is the code I ended up with: HMODULE hModule; LPCWSTR path = L"nptest.dll"; GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, path, &hModule); LPTSTR resourceName = MAKEINTRESOURCE(106); HBITMAP bitmap = (HBITMAP) LoadImage(hModule, resourceName, IMAGE