Hi,
Try this code below,
declare these variables globally, and the code that follows inside WinProc()
HBITMAP bitmap;
HDC hdcMem;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
hdcMem = CreateCompatibleDC(hdc);
SelectObject(hdcMem, bitmap);
StretchBlt(
hdc,
0,
0,
1000,
1000,
hdcMem,
0,
0,
1000,
1000,
SRCCOPY);
EndPaint(hWnd, &ps);
break;
case WM_CREATE:
bitmap=(HBITMAP)LoadImage(NULL,"C:\\Wallpaper.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
break;
In my example, i have kept a image file in "C:\\Wallpaper.bmp", so change as per your location.
Inside the api "StretchBlt" give appropriate dimensions as per your requirement.
Hope this will help you.
Bye.