Print Page | Close Window

Apply a skin to a regular MFC dll dialog box

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=7515
Printed Date: 30 November 2024 at 11:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Apply a skin to a regular MFC dll dialog box
Posted By: Synapse
Subject: Apply a skin to a regular MFC dll dialog box
Date 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 - uploads/20070703_110545_MiniDll.rar


-------------
Codejock Xtrem Skin Framework 2007 11.1.3
Windows XP SP2



Replies:
Posted By: Oleg
Date Posted: 03 July 2007 at 2:27pm
Hi,
 
Just add XTPSkinManager()->LoadSkin(NULL); in ~CMiniDlg() :
 
CMiniDlg::~CMiniDlg()

{

    XTPSkinManager()->LoadSkin(NULL);

}



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Synapse
Date Posted: 04 July 2007 at 3:15am
Thank you a lot. It solves the crash.

-------------
Codejock Xtrem Skin Framework 2007 11.1.3
Windows XP SP2



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net