15,980
社区成员




Image *titleImg = NULL;
Image *amiImg = NULL;
Image *figBorder = NULL;
Image *fig = NULL;
Image *minImg = NULL;
Image *maxImg = NULL;
Image *closeImg = NULL;
titleImg = new Image(L"title.png");
amiImg = new Image(L"Logining.gif");
figBorder = new Image(L"mainfigure_over.png");
fig = new Image(L"figure.png");
minImg = new Image(L"min_nor.png");
maxImg = new Image(L"max_nor.png");
closeImg = new Image(L"close_nor.png");
HDC hMemdc = CreateCompatibleDC(hdc);
Graphics graphics(hMemdc);
//获取窗口标题的高度和窗口宽度
RECT rcWnd;
GetWindowRect(hWnd,&rcWnd);
RECT rcClient;
GetClientRect(hWnd,&rcClient);
int nBottomBorder = GetSystemMetrics(SM_CXEDGE) ;
int nLeftBorder = GetSystemMetrics(SM_CYEDGE) ;
int nWndHeight = rcWnd.bottom-rcWnd.top;
int nWndWidth = rcWnd.right - rcWnd.left;
int nCaptionHeight = nWndHeight - (rcClient.bottom - rcClient.top) - nBottomBorder;
int nCaptionWidth = rcWnd.right - rcWnd.left;
graphics.DrawImage(titleImg,0,0,nLeftBorder,nWndHeight);
graphics.DrawImage(titleImg,nWndWidth-nLeftBorder,0,nLeftBorder,nWndHeight);
graphics.DrawImage(titleImg,0,nWndHeight-nBottomBorder,nWndWidth,nBottomBorder);
graphics.DrawImage(titleImg,0,0,nCaptionWidth,nCaptionHeight);
//graphics.DrawImage(amiImg,100,100);
graphics.DrawImage(figBorder,20,40);
graphics.DrawImage(fig,40,60);
graphics.DrawImage(closeImg,nCaptionWidth-15-28,1);
graphics.DrawImage(maxImg,nCaptionWidth-15-28*2,1);
graphics.DrawImage(minImg,nCaptionWidth-15-28*3-1,1);
BitBlt(hdc,0,0,nWndWidth,nWndHeight,hMemdc,0,0,SRCCOPY);