Themed dialog caption disappears |
Post Reply |
Author | |
JerryEvans
Groupie Joined: 01 May 2008 Location: United Kingdom Status: Offline Points: 39 |
Post Options
Thanks(0)
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Move it to constructor of Dialog.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
JerryEvans
Groupie Joined: 01 May 2008 Location: United Kingdom Status: Offline Points: 39 |
Post Options
Thanks(0)
|
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Yes, SkinFramework needs import table to hook API calls. :-(
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
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.
|
|
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 |