#include “stdafx.h“
#include “bitmaptool.h“
#include “gamemap.h“
extern GAMEMAP gamemap;
extern FILEREPORT f1;
MYBITMAP::MYBITMAP()
{
}
MYBITMAP::~MYBITMAP()
{
Deleteobject(hBm);
}
void MYBITMAP::Init(HINSTANCE hInstanceint iResourceint rowint col)
{
BITMAP bm;
inum=row;
jnum=col;
hBm=LoadBitmap(hInstanceMAKEINTRESOURCE(iResource));
Getobject(hBmsizeof(BITMAP)&bm);
width=bm.bmWidth/inum;
height=bm.bmHeight/jnum;
}
void MYBITMAP::SetDevice(HDC hdestHDC hsrcint wwinint hwin)
{
hdcdest=hdest;
hdcsrc=hsrc;
screenwidth=wwin;
screenheight=hwin;
}
void MYBITMAP::Show(int xint y)
{
xpos=x;
ypos=y;
Selectobject(hdcsrchBm);
BitBlt(hdcdestxposyposwidthheighthdcsrc00SRCCOPY);
}
void MYBITMAP::ShowCenter(int y
评论
共有 条评论