我想把如下代码改成SDK方式的代码,谢谢了
CDC memDc;
memDc.CreateCompatibleDC(NULL);
CDC* pWindowDC=GetWindowDC();
CRect DrawArea;
GetWindowRect(DrawArea);
CBitmap airMap;
BITMAP airMapInfo;
airMap.LoadBitmap(IDB_BITMAP1);
airMap.GetBitmap(&airMapInfo);
memDc.SelectObject(&airMap);
pWindowDC->StretchBlt(0,0,DrawArea.Width(),DrawArea.Height(),&memDc,0,0,airMapInfo.bmWidth,airMapInfo.bmHeight,SRCCOPY);
airMap.DeleteObject();
//以下是移动窗口位置
HDC hScrDC;// 屏幕设备描述表
int xScrn,yScrn;// 屏幕分辨率
//为屏幕创建设备描述表
hScrDC = CreateDC("DISPLAY", NULL, NULL, NULL);
// 获得屏幕分辨率
HWND hWnd = ::FindWindow("Shell_TrayWnd", NULL);
RECT rc;
::GetWindowRect(hWnd, &rc);
int iHeight = rc.bottom -rc.top;
xScrn = GetDeviceCaps(hScrDC,HORZRES);
yScrn = GetDeviceCaps(hScrDC,VERTRES);
yScrn-=iHeight;
CFont font;
CFont *pOldFont=NULL;
font.CreatePointFont(90,"宋体");
pOldFont=(CFont *)pWindowDC->SelectObject(&font);
pWindowDC->SetBkMode(TRANSPARENT);//字体透明
pWindowDC->SetTextColor(RGB(255,255,255));
pWindowDC->TextOutA(10,100,"test");
MoveWindow(xScrn-DrawArea.Width(),yScrn-DrawArea.Height(),DrawArea.Width(),DrawArea.Height());