Print Page | Close Window

Problem with ComboBox child window

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=11387
Printed Date: 23 November 2024 at 12:43am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with ComboBox child window
Posted By: upeters
Subject: Problem with ComboBox child window
Date Posted: 10 July 2008 at 2:35pm
Hello,

I am developing a plugin for a third-party application, which is among other things adding the possibility to skin the application window.

I am able to use the ActiveX correctly (it skins the scrollbar of dropdown window of the ComboBox as expected), but the MFC version refuses to skin the scrollbar of the child window, keeping the current Windows skin. Normal child windows (like a MessageBox) are skinned correctly.

Here is an excerpt of the program, showing how I activate the SkinFramework.

union uMyUnion {
    long unsigned uValue;
    HWND hWnd;
};
(...)
if (XTPSkinManager()->LoadSkin(_T(szTheme), _T(szIniFile)) != TRUE) {
    // failure, abort here
    nLastError = 12001;
    lua_pushnumber(L, (double)1);
}
else {
    // apply skin
    u.uValue = (long unsigned)dParameter;
    XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() | xtpSkinApplyFrame | xtpSkinApplyColors | xtpSkinApplyMetrics);
    XTPSkinManager()->ApplyWindow(u.hWnd);
    lua_pushnumber(L, (double)0);
}

Here is a picture showing the result, note that the scrollbar is not correctly skinned:



Could somebody show me what I am missing? Thank you in advance.

Ulrich



Replies:
Posted By: Smucker
Date Posted: 10 July 2008 at 3:05pm
I think the combo box drop-down is not actually a child of the window, so it won't be skinned unless you're skinning all new windows.

  XTPSkinManager()->SetAutoApplyNewWindows(TRUE);
  XTPSkinManager()->SetAutoApplyNewThreads(TRUE);




-------------
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)

Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)

Language: Visual C++ 9.0 (Studio 2008)



Posted By: upeters
Date Posted: 10 July 2008 at 3:24pm
Hello, thank you for your post.

I tried that in the past (and once more right now just to make sure), but it didn't seem to make any difference. A pop-up message box is skinned correctly, so it seems that I am indeed skinning child windows - just not that one.
The strange thing is that when I use the OCX and perform the same steps
SkinFramework:LoadSkin(".\\AutoPlay\\Docs\\VistaVGBlue.cjstyles","");

SkinFramework:ApplyWindow(Application.GetWndHandle());
it works normally, and the dropdown is skinned. It is as if the OCX is doing something undocumented, that has to be done as well to make the MFC version work in the same way.


Ulrich


Posted By: Oleg
Date Posted: 11 July 2008 at 3:15am
Hi,
 
Load Skin before you create this dialog.


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


Posted By: upeters
Date Posted: 11 July 2008 at 9:30am
Thank you!

Just calling LoadSkin once (without pointing to any skin) before the dialog is displayed is indeed sufficient - now the scrollbars of the combobox are skinned correctly.

Ulrich



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