XTP12.1.1 skin problem of VB6 COM class |
Post Reply |
Author | |
mihey
Groupie Joined: 14 May 2003 Location: Germany Status: Offline Points: 45 |
Post Options
Thanks(0)
Posted: 28 January 2009 at 6:33am |
Hi, After migrating our project from XTP 11.2.2 to XTP12.1.1 I have a nasty problem with skinning our plug-ins which are created as COM objects in VB6. I tested it only on my XP SP3. After opening a dialog the window frame is drawn un-skinned with the dark text and then disappears completely after a few seconds (see screenshots). With the old library this worked perfectly. For reproduced this problem I've created a small test application based on "SkinControls" example application. In SkinControlsDlg.cpp module I’ve added OnBnClickedButtonSample handler which invokes the COM object when you press "Sample Button". The changed .cpp file is included into the attachment as well as the VB project of the COM object. The file XTPSkinTest.dll contains the compiled COM class and has to be registered first.
Here is the test
Any ideas?
Best regards, Mikhail Tyukin
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Please change code as
if (SUCCEEDED(hr))
{ CXTPSkinManagerApiHook::GetInstance()->FinalizeHookManagement(); CXTPSkinManagerApiHook::GetInstance()->InitializeHookManagement(); pDispatch->GetIDsOfNames(IID_NULL, &szMember, 1, LOCALE_USER_DEFAULT, &dispid);
hr = pDispatch->Invoke(dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, ¶ms, &result, NULL, NULL); } It will hook new loaded dlls.
to skin Visual Basic controls you can add
XTPSkinManager()->GetClassMap()->AddSynonymClass(_T("ThunderRT6CheckBox"), _T("Button"));
XTPSkinManager()->GetClassMap()->AddSynonymClass(_T("ThunderCheckBox"), _T("Button")); XTPSkinManager()->GetClassMap()->AddSynonymClass(_T("ThunderRT6OptionButton"), _T("Button")); XTPSkinManager()->GetClassMap()->AddSynonymClass(_T("ThunderRT6CommandButton"), _T("Button")); XTPSkinManager()->GetClassMap()->AddSynonymClass(_T("ThunderOptionButton"), _T("Button")); XTPSkinManager()->GetClassMap()->AddSynonymClass(_T("ThunderCommandButton"), _T("Button")); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
mihey
Groupie Joined: 14 May 2003 Location: Germany Status: Offline Points: 45 |
Post Options
Thanks(0)
|
Hi Oleg! It works now. Great! I just add these two lines after initializing all my plugins and now it works like a charm. Concerning AddSynonymClass, I used already this method before with my VB controls, anyway thank you for the info. BTW, if I do AddSynonymClass(_T("StatusBar20WndClass"), _T("msctls_statusbar32") it doesn’t work. I guess because using own drawing methods. Thanks a lot for your fast support! Kind Regards,Mikhail Tyukin
Development leader |
|
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 |