贴一下我添加背景图的代码,请高人帮我看看:
BOOL ShowJpgGif(CDC* pDC,CString strPath, int x, int y, int hight, int width)
{
IStream *pStm;
CFileStatus fstatus;
CFile file;
LONG cb;
是因为我拖动窗口的操作是处理的这个函数吗?
void CDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
//Move dlg when drag its client region
SendMessage(WM_SYSCOMMAND,SC_MOVE|HTCLIENT,0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
//Load Dlg Skin
LoadMainDlgSkin();