Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Skin doesn't apply...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skin doesn't apply...

 Post Reply Post Reply
Author
Message
ddlittle View Drop Down
Senior Member
Senior Member


Joined: 19 February 2004
Location: United States
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote ddlittle Quote  Post ReplyReply Direct Link To This Post Topic: Skin doesn't apply...
    Posted: 01 July 2008 at 6:43pm
I have an app that checks for some pre-requisites in CWinApp:InitInstance(), and if it doesn't find them, it tells the user via AfxMessageBox().  The problem is that the skin isn't applied - i'm using Vista/black - and the message comes up in the old blue style.
 
I tried moving some of the code to the frame, but by then it's too late, so I got a (non-XTP-related) crash.
 
If the Init function completes, the skins are all applied.  Any ideas how to apply a skin to a messagebox - without having to write my own modal dlg??
 
thanks!
 
- David
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: 02 July 2008 at 1:16am
Hi,
 
Have to work. Are you sure you already load skin in this point ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ddlittle View Drop Down
Senior Member
Senior Member


Joined: 19 February 2004
Location: United States
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote ddlittle Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2008 at 9:49am
No, the LoadSkin hasn't been called yet, because the CWndFrameWnd hasn't been created yet.  The message box appears, followed by a dialog before the frame gets created.  Once the frame is created and the skin loaded, then everything's perfect.  it's just the first two boxes appear in the default Windows style.
 
This code was written 10 years back by some long-gone programmer, and I hate to rewrite it, but if that's the solution, then I will.
 
 
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: 02 July 2008 at 10:07am
Hi,
Just move LoadSkin from CWndFrameWnd  to InitInstance.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.172 seconds.