Hello,
Please help me to resize BMP image to bigger and smaller.
Actually I'm trying to build PC wallpaer image with some function.
And changing wallpaper has no problem but I want to change any image to screen size.
Since desktop screen has some infomation section, bmp image should resized by me.
Kindly see below code and please help me to add resize code .
Thanks a billion.
BITMAP bmpInfo;
HBITMAP hOldBit;
HBITMAP MyBit;
MyBit = (HBITMAP)LoadImage(NULL, "bgimg.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_DEFAULTSIZE);
HDC MemDC =CreateCompatibleDC(pDC);
hOldBit=(HBITMAP)SelectObject(MemDC,MyBit);
GetObject(MyBit,sizeof(BITMAP),&bmpInfo);
BitBlt(tdc,TEXT_ZONE_GAP,TEXT_ZONE_GAP, (nXScreen - TEXT_ZONE_WIDTH_SIZE) - 20, nYScreen - 20, MemDC,0,0,SRCCOPY);
SelectObject(MemDC,hOldBit);
DeleteDC(MemDC);