Im using Visual Studios 2012 using c++ I have been trying to load a bitmap from my resources
Like this
}
and calling the function like this
It wasn't loading anything so I put a breakpoint at
when I hover the cursor over ImageID it says
ImageID = 0x00000065 <Error reading characters of string.>
I cant figure out the problem I have Unicode enabled I don't know if that has anything to do with it.
Like this
Code:
HRESULT DemoApp::CreateDIBFromResource(HWND hWnd, HINSTANCE Instance, LPCWSTR ImageID)
{
HRESULT hr = S_OK;
HBITMAP bitmap = (HBITMAP)LoadBitmap(GetModuleHandle(0),MAKEINTRESOURCE(ImageID));
return hr;
and calling the function like this
Code:
if(SUCCEEDED(CreateDIBFromResource(hWnd,NULL, MAKEINTRESOURCE(IDB_BACKGROUND))))
{
InvalidateRect(hWnd, NULL, TRUE);
}
Code:
return hr;
ImageID = 0x00000065 <Error reading characters of string.>
I cant figure out the problem I have Unicode enabled I don't know if that has anything to do with it.