Small fixes for correct resource loading |
Post Reply |
Author | |
sharky
Newbie Joined: 07 January 2009 Location: Czech Republic Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 02 February 2009 at 12:11pm |
BugFix: XTPResourceManager->SetResourceHandle() does not affect on some internal functions related to resources in XTToolKitPro. XTToolkitPro 12.0.1 (may be it corrected in newer version. If not, please review this code)
void CXTEditListBox::SetListEditStyle(UINT nTitle, DWORD dwLStyle/*= LBS_XT_DEFAULT*/)
{ CString string; //Fix VERIFY(string.LoadString(XTPResourceManager()->GetResourceHandle(),nTitle)); //VERIFY(string.LoadString(nTitle));
SetListEditStyle(string, dwLStyle); } and
void CXTPTaskDialogClient::CreateIcons()
{ // create small icon. SAFE_DELETE_HICON(m_hIconFooter); m_hIconFooter = CreateIcon(m_pConfig->hFooterIcon, m_pConfig->pszFooterIcon, m_sizeIconFooter, IsFooterIconHandleUsed()); // create large icon.
SAFE_DELETE_HICON(m_hIconMain); m_hIconMain = CreateIcon(m_pConfig->hMainIcon, m_pConfig->pszMainIcon, m_sizeIconMain, IsMainIconHandleUsed()); if (IsLinkButtonsUsed() && IsLinkButtonsIconVisible() && m_pIconLinkGlyph == 0)
{ m_pIconLinkGlyph = new CXTPImageManagerIcon(0, 20, 20); BOOL bRTLLayout = (m_pConfig->dwFlags & TDF_RTL_LAYOUT);
CXTPImageManagerIconHandle hIconGlyph;
CXTPImageManagerIconHandle hIconGlyphHot; // correct loading указание на хэндл управляемый тулкитом
HBITMAP hBitmap = (HBITMAP)CXTPImageManagerIcon::LoadAlphaBitmap(XTPResourceManager()->GetResourceHandle(), MAKEINTRESOURCE(XTP_IDB_GLYPH));
// HBITMAP hBitmap = (HBITMAP)CXTPImageManagerIcon::LoadAlphaBitmap(XTP_IDB_GLYPH);
if (bRTLLayout) { hIconGlyph = CXTPImageManagerIcon::InvertAlphaBitmap(hBitmap); DeleteObject(hBitmap); } else { hIconGlyph = hBitmap; } // Correct loading
hBitmap = (HBITMAP)CXTPImageManagerIcon::LoadAlphaBitmap(XTPResourceManager()->GetResourceHandle(), MAKEINTRESOURCE(XTP_IDB_GLYPH_HOT));
// hBitmap = (HBITMAP)CXTPImageManagerIcon::LoadAlphaBitmap(XTP_IDB_GLYPH_HOT);
if (bRTLLayout) { hIconGlyphHot = CXTPImageManagerIcon::InvertAlphaBitmap(hBitmap); DeleteObject(hBitmap); } else { hIconGlyphHot = hBitmap; } m_pIconLinkGlyph->SetIcon(hIconGlyph);
m_pIconLinkGlyph->SetHotIcon(hIconGlyphHot); } } |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Thanks.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |