15,979
社区成员
发帖
与我相关
我的任务
分享
int CLogin::Draw(CDC* dc)
{
CDC m_hdcMemory;
m_hdcMemory.CreateCompatibleDC(dc);
CBitmap hBitMap;
hBitMap.CreateCompatibleBitmap(dc,gLoginBkImage->GetWidth(),gLoginBkImage->GetHeight());
m_hdcMemory.SelectObject(hBitMap);
RECT rct;
GetWindowRect(&rct);
POINT ptWinPos={rct.left,rct.top};
Graphics graph(m_hdcMemory);
Point points[]={Point(0,0),Point(gLoginBkImage->GetWidth(),0),Point(0,gLoginBkImage->GetHeight())};
static bool bFly=false;
graph.DrawImage(gLoginBkImage,points,3);
SIZE sizeWindow={gLoginBkImage->GetWidth(),gLoginBkImage->GetHeight()};
POINT ptSrc={0,0};
DWORD dwExStyle=GetWindowLong(this->m_hWnd,GWL_EXSTYLE);
if((dwExStyle&0x80000)!=0x80000)
SetWindowLong(this->m_hWnd,GWL_EXSTYLE,dwExStyle^0x80000);
UpdateLayeredWindow(dc,&ptWinPos,&sizeWindow,&m_hdcMemory,&ptSrc,0,&m_Blend,2);
graph.ReleaseHDC(m_hdcMemory.m_hDC);
return 0;
}