Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Apply a skin to a regular MFC dll dialog box
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Apply a skin to a regular MFC dll dialog box

 Post Reply Post Reply
Author
Message
Synapse View Drop Down
Groupie
Groupie


Joined: 28 June 2007
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote Synapse Quote  Post ReplyReply Direct Link To This Post Topic: Apply a skin to a regular MFC dll dialog box
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Synapse View Drop Down
Groupie
Groupie


Joined: 28 June 2007
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote Synapse Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.