//加载位图 bool CSkinButton::SetButtonImage(UINT uBitmapID, HINSTANCE hInstance, bool bExpandImage) { //加载位图 ASSERT(uBitmapID!=0); if (uBitmapID==0) return false; m_bExpand=bExpandImage; m_ImageBack.SetLoadInfo(uBitmapID,hInstance); //调整位置 if (m_bExpand==false) FixButtonSize(); if (GetSafeHwnd()) Invalidate(FALSE); return true; }
//加载位图 bool CGdiButton::SetButtonImage(LPCTSTR lpResName, HINSTANCE hInstance, bool bExpandImage) { //加载位图 if (lpResName==NULL) return false; m_bExpand=bExpandImage; if(!m_pngBack.IsNull()) m_pngBack.DestroyImage(); m_pngBack.LoadImage(hInstance, lpResName); //调整位置 if (m_bExpand==false) FixButtonSize(); if (GetSafeHwnd()) Invalidate(FALSE); return true; }
//加载位图 bool CButtonEx::SetButtonImage(HINSTANCE hInstance,LPCTSTR pszResourceName, bool bExpandImage) { //加载位图 ASSERT(pszResourceName!=0); if (pszResourceName==NULL) return false; m_bExpand=bExpandImage; m_ImageBack.LoadImage(hInstance,pszResourceName); //调整位置 if (m_bExpand==false) FixButtonSize(); if (GetSafeHwnd()) Invalidate(FALSE); return true; }
//加载位图 bool CSkinButton::SetButtonImage(LPCTSTR pszFileName, bool bExpandImage) { //效验参数 ASSERT(pszFileName); if (pszFileName==NULL) return false; //加载位图 m_bExpand=bExpandImage; m_ImageBack.SetLoadInfo(pszFileName); //调整位置 if (m_bExpand==false) FixButtonSize(); if (GetSafeHwnd()) Invalidate(FALSE); return true; }
//加载位图 bool CGdiButton::SetButtonImage(LPCTSTR pszFileName, bool bExpandImage) { //效验参数 ASSERT(pszFileName); if (pszFileName==NULL) return false; //加载位图 m_bExpand=bExpandImage; if(!m_pngBack.IsNull()) m_pngBack.DestroyImage(); m_pngBack.LoadImage(pszFileName); //调整位置 if (m_bExpand==false) FixButtonSize(); if (GetSafeHwnd()) Invalidate(FALSE); return true; }