Apply a skin to a regular MFC dll dialog box |
Post Reply |
Author | |
Synapse
Groupie Joined: 28 June 2007 Status: Offline Points: 22 |
Post Options
Thanks(0)
Posted: 03 July 2007 at 11:06am |
Hi,
I'm trying to use the Skin Framework to skin a dialog box. This dialog box is in a regular MFC dll, and I call it through a little application and a wrapper. My dll contains only one function that display an "Hellow World" dialog box. int WINAPI DisplayDlg() { AFX_MANAGE_STATE(AfxGetStaticModuleState()); CString strMessage("Hello world !"); CMiniDlg dlg(AfxGetMainWnd(), strMessage); int ret = dlg.DoModal(); ret = GetLastError(); return 0; } The dialog box displays perfectly and is well skinned, but when I kill it (by cliking on the OK button or closing the dialog), a crash occurs (access violation). Here's my solution folder (VS2005), if it can help.uploads/20070703_110545_MiniDll.rar |
|
Codejock Xtrem Skin Framework 2007 11.1.3
Windows XP SP2 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Just add XTPSkinManager()->LoadSkin(NULL); in ~CMiniDlg() :
CMiniDlg::~CMiniDlg()
{ XTPSkinManager()->LoadSkin(NULL); } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Synapse
Groupie Joined: 28 June 2007 Status: Offline Points: 22 |
Post Options
Thanks(0)
|
Thank you a lot. It solves the crash.
|
|
Codejock Xtrem Skin Framework 2007 11.1.3
Windows XP SP2 |
|
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 |