![]() |
SetImageHandle Error |
Post Reply ![]() |
Author | |
hari ![]() Newbie ![]() Joined: 12 July 2007 Location: Iceland Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() Posted: 10 September 2008 at 4:48am |
hi
In vista (VS2008), the below code is crashing the exe. VERIFY(InitCommandBars()); CXTPCommandBars* pCommandBars = GetCommandBars(); HMODULE hModule =LoadLibrary(theApp.m_AppPath +_T("\\Office2007Blue.dll")); CXTPPaintManager::SetTheme( hModule ? xtpThemeRibbon : xtpThemeOffice2003 ); if(hModule) { ((CXTPOffice2007Theme*)pCommandBars->GetPaintManager())->SetImageHandle( Module, 0/*_T("Office2007Theme.ini")*/ ); //((CXTPOffice2007Theme*)pCommandBars->GetPaintManager())->SetImageHandle( *hModule*/ m_hModuleOfficeBlueRes, 0/*_T("Office2007Theme.ini")*/ ); } It is crashing on the SetImageHandle func. Using Toolkit pro static link. Please help. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Try to specify "OFFICE2007BLUE.INI" as second parameter.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
hari ![]() Newbie ![]() Joined: 12 July 2007 Location: Iceland Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Hi
I can set ribbon theme in _DEBUG mode ; but not in release mode. It is crashing on SetImageHandle. Also found that I cannot set office2007 theme in mfc static link, but it works ok in mfc shared dll mode. CJ Sample DialogSample in commandbars also has the same issue so I think this is related to MFC library. When building with STATIC_LINK and static link to MFC, no commandbars are created. I dont have VS2008 SP1 installed. |
|
![]() |
|
hari ![]() Newbie ![]() Joined: 12 July 2007 Location: Iceland Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
I reinstalled VS2008 and recompiled CJ and now I can set Office2007 theme. Must have been a corrupted VS2008 SP1 install which did not complete.
Ribbon is still not possible using _XTP_STATICLINK and MFC static. Please help. The issue with CJ DialogSample still exists. When building with _XTP_STATICLINK and static link to MFC, no commandbars are created. |
|
![]() |
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 |