Re: Bitmap not displaying
WindowProcedure is called MANY times, and each time the bmpExercising variable is created and not initialized. So what actually happen is that you load the image with LoadImage, but then the handle is lost, and SelectObject select a (hopefully) NULL bitmap.
Code:
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hDC, MemDCExercising;
PAINTSTRUCT Ps;
static HBITMAP bmpExercising;
Re: Bitmap not displaying
Thanks for the reply, my understanding from what you said is that I need to declare bmpExercising from outside of the procedure?
Re: Bitmap not displaying
Great! Thanks, it worked after all of that.
Quote:
In the long run I'm hoping to change the picture displayed in the Window using data I receive from a winsock server as an argument as to which picture is shown.
Would this be possible?