1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
LRESULT CALLBACK Loginpage (HWND hwnd , UINT msg , WPARAM wParam , LPARAM lParam)
{
switch(msg)
{
PAINTSTRUCT ps;
HDC hdc;
HDC compatible_bitmap_hdc;
HBITMAP bitmap;
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
bitmap = (HBITMAP)LoadImage(NULL, "Skynet Logo.bmp", IMAGE_BITMAP,0, 0, LR_LOADFROMFILE);
compatible_bitmap_hdc = CreateCompatibleDC(hdc);
SelectObject(compatible_bitmap_hdc, bitmap);
SetStretchBltMode(hdc, HALFTONE);
StretchBlt(hdc,400, 0, 397, 300, compatible_bitmap_hdc, 0, 0, 640, 480, SRCCOPY);
DeleteDC(compatible_bitmap_hdc);
DeleteObject(bitmap);
EndPaint(hwnd, &ps);
break;
|