Set theme for dynamically created controls
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=24622
Printed Date: 06 March 2026 at 10:03pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Set theme for dynamically created controls
Posted By: vccomnet
Subject: Set theme for dynamically created controls
Date Posted: 17 January 2026 at 10:19pm
Hello, I encountered a problem: I wanted to dynamically create a CXTPEdit control on a CFormView and set its theme to xtpControlThemeVisualStudio2015. So, I referenced the demo Controls.exe, but the CXTPEdit in Controls.exe was drawn through a dialog box, not dynamically created. Therefore, I dynamically created a CXTPEdit in Controls.exe, but the result was the same as in CFormView: the dynamically created CXTPEdit did not have the xtpControlThemeVisualStudio2015 theme, meaning that when the mouse moved over the Edit, no bright border was displayed, and when the mouse moved away from the Edit, the border disappeared. My Create code and the final effect are shown below. Please help me identify any issues with my code? Thank you
|
Replies:
Posted By: vccomnet
Date Posted: 20 January 2026 at 8:00am
Posted By: vccomnet
Date Posted: 29 January 2026 at 3:07am
|
Is it because my problem description is not clear? I mean, when I set the theme of the CEdit control created dynamically through Create, it has no effect. However, the CEdit created statically by dragging on the dialog box is different. The screenshot above has provided my code and the final effect. Could you point out any issues with my code or give me some suggestions?
|
|