Skin doesn't apply... |
Post Reply |
Author | |
ddlittle
Senior Member Joined: 19 February 2004 Location: United States Status: Offline Points: 132 |
Post Options
Thanks(0)
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
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Have to work. Are you sure you already load skin in this point ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
ddlittle
Senior Member Joined: 19 February 2004 Location: United States Status: Offline Points: 132 |
Post Options
Thanks(0)
|
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Just move LoadSkin from CWndFrameWnd to InitInstance.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |