In order to use gdiplus you first have to initialise it with Gdiplus::GdiplusStartup then, when your done, you release it with a call to Gdiplus::GdiplusShutdown (see the example I posted).
You can't use an unitialised pointer: either declare and allocate your Gdiplus::Graphics object as:
Code:
Gdiplus::Graphics *gs=new Gdiplus::Graphics(hdc);
(see the example I have posted) or as:
Code:
Gdiplus::Graphics gs(hdc);
where 'hdc' is the device context to be associated with the Graphics object. If you go with the first method then don't forget to use delete on the pointer.
Use appropriate member access syntax; '->' for pointer to member, otherwise use '.'.
Gdiplus requires UNICODE strings so precede string literals with 'L' to make sure the functions get just that. For example where you have the path "misc0001.tif", change it to L"misc0001.tif".
So, your modified WM_PAINT handler would look something like:
Code:
case WM_PAINT:
{
hdc = BeginPaint(hWnd, &ps);
Gdiplus::Graphics gs(hdc);
Gdiplus::Image image(L"misc0001.tif");
gs.DrawImage(&image,0,0);
EndPaint(hWnd, &ps);
break;
}