加载图片方式

 hdc=GetDC(hWnd);
   mdc=CreateCompatibleDC(hdc);
   hbmp=(HBITMAP)LoadImage(NULL,"sky.bmp",IMAGE_BITMAP,600,450,
    LR_LOADFROMFILE);
   SelectObject(mdc,hbmp);
   BitBlt(hdc,0,0,600,450,mdc,0,0,SRCCOPY);

删除对象

ReleaseDC(hWnd,mdc);
  DeleteObject(hbmp);

你可能感兴趣的:(图片)