Print Page | Close Window

Themed dialog caption disappears

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=10639
Printed Date: 16 November 2024 at 11:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Themed dialog caption disappears
Posted By: JerryEvans
Subject: Themed dialog caption disappears
Date 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





Replies:
Posted By: Oleg
Date Posted: 16 May 2008 at 1:38am

Hi,

Move it to constructor of Dialog.


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


Posted By: JerryEvans
Date 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.


Posted By: Oleg
Date Posted: 16 May 2008 at 2:45pm

Hi,

Yes, SkinFramework needs import table to hook API calls. :-(


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


Posted By: znakeeye
Date 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.



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