Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Themed dialog caption disappears
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Themed dialog caption disappears

 Post Reply Post Reply
Author
Message
JerryEvans View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2008
Location: United Kingdom
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote JerryEvans Quote  Post ReplyReply Direct Link To This Post Topic: Themed dialog caption disappears
    Posted: 15 May 2008 at 12:46pm
Hi

I've got a weird problem with the skins in a dialog application. By default it is set to use the Vista skin - when it runs first time I see this effect:

Ignoring the fact no skin is loaded, you can see that the caption bar is not being painted at all. What worse is that if focus returns to the app the caption appears for a second or two and then disappears.

I am only calling these XTP functions during OnInitDialog().

1. XTPSkinManager()->ApplyWindow(m_hWnd);
2. XTPSkinManager()->LoadSkin("path to skin file");
3. RedrawWindow(NULL,NULL,RDW_FRAME|RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE|RDW_ALLCHILDREN);

Does the skin manager get confused if the dialog is resized/repositioned?

Any ideas? I am uncomfortably close to a release and I need to be certain this is all going to work correctly.

Thanks.

Jerry


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: 16 May 2008 at 1:38am

Hi,

Move it to constructor of Dialog.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JerryEvans View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2008
Location: United Kingdom
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote JerryEvans Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2008 at 5:41am
Why would that help? I do not have a window handle at that point and therefore would not be able to call RedrawWindow() to ensure caption changes etc.

I think I have identified the problem. The skin framework works by hooking API calls. The release version of Riffster is processed by some anti-cracking software which patches the import table etc to make reverse engineering more difficult. I rather suspect this is the problem. I am going to put some tracer code into the hooking sections and see where it is failing.
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: 16 May 2008 at 2:45pm

Hi,

Yes, SkinFramework needs import table to hook API calls. :-(
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2008 at 4:57am
In my opinion sophisticated anti-cracking software is a waste of money.
1) You need to install as a privileged user, which is disencouraged by Microsoft since UAC in Vista.
2) The code gets bloated and you can end up with HARD crashes that simply reboots your computer.
3) No matter what, a skilled cracker breaks the protection within a couple of hours.
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.141 seconds.