![]() |
Loading Theme from other source |
Post Reply
|
| Author | |||
Michl
Senior Member
Joined: 14 September 2007 Status: Offline Points: 138 |
Post Options
Thanks(0)
Quote Reply
Topic: Loading Theme from other sourcePosted: 30 June 2009 at 4:09am |
||
|
Hi,
how is it possible to load themes from an external dll?
This code expects the theme resources in the executable. My resolution was after selecting theme:
This seems to work. But with current release, this runs into the warning:
Temporarly I documented out this code, but is there a better way to resolve this problem? Thanks |
|||
![]() |
|||
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 July 2009 at 8:06am |
||
|
Hi,
Guess problem in FreeLibrary( hModule ); you call.
|
|||
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|||
![]() |
|||
Michl
Senior Member
Joined: 14 September 2007 Status: Offline Points: 138 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 July 2009 at 8:16am |
||
|
What do you mean?
Should I free library at shut down? I thought the resources will be load into memory? It would be nice to set an resource handle before first time the resources will be loaded. |
|||
![]() |
|||
kstowell
Admin Group
Joined: 25 January 2003 Location: MIchigan, USA Status: Offline Points: 496 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 July 2009 at 11:16am |
||
|
Try making hModule a member variable and free it in your dtor, for example:
.h file:
.cpp file:
|
|||
|
Kirk Stowell, President and CEO
CODEJOCK SOFTWARE SOLUTIONS< |
|||
![]() |
|||
__BornInUssr__
Newbie
Joined: 06 April 2010 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 April 2010 at 6:38am |
||
|
Sorry, but I can't solve the same problem. Please help!
I use next code: hResource = LoadLibrary(sPath); if(hResource) AfxSetResourceHandle(hResource); After, on my MainFrame called: XTPPaintManager()->SetTheme(xtpThemeRibbon); And this call brings me to the same crash in Codejock. |
|||
![]() |
|||
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 |