MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / LoadImageFromResource

Method LoadImageFromResource

LuaSTGPlus/SplashWindow.cpp:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24Gdiplus::Image* SplashWindow::LoadImageFromResource(UINT nID, LPCTSTR sTR)
25{
26 HRSRC hRsrc = ::FindResource(GetModuleHandle(NULL), MAKEINTRESOURCE(nID), sTR);
27 if (!hRsrc)
28 return NULL;
29 DWORD len = SizeofResource(GetModuleHandle(NULL), hRsrc);
30 BYTE* lpRsrc = (BYTE*)LoadResource(GetModuleHandle(NULL), hRsrc);
31 if (!lpRsrc)
32 return NULL;
33 Image* ret = LoadImageFromMemory(lpRsrc, len);
34 FreeResource(lpRsrc);
35 return ret;
36}
37
38LRESULT WINAPI SplashWindow::WndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
39{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected