Print Page | Close Window

CXTPTabControl questions

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=4866
Printed Date: 11 November 2025 at 2:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPTabControl questions
Posted By: SergeyS
Subject: CXTPTabControl questions
Date Posted: 23 August 2006 at 2:11pm

When I use CXTPTabControl inside of another CXTPTabControl in a themed application headers background does not look good. It's not themed. (See attachment). Is there any standard way to avoid this?

To fix this I use CXTPWinThemeWrapper::DrawThemeParentBackground and it works well, but only if I don't use skins. After loading a skin CXTPSkinManagerApiHook::OnHookGetProcAddress cannot find DrawThemeParentBackground. I tested several other methods from UXTHEME.DLL and CXTPSkinManagerApiHook::OnHookGetProcAddress could not find any of them. (Those methods are not hooked in CXTPSkinManagerApiHook::InitializeHookManagement).

Any thoughts on this?

 

Another question:

CXTPTabControl::InsertItem has this code:

            if (nItem == 0)

            {

                        SetCurSel(0);

            }

It does not work well if I want to just insert a new tab at 0 position into existing control with another tab selected. Wouldn't it be better to check whether the control is empty or not? I had to override it because of that.

 
I don’t have 10.3 yet so I don't if any of that was changed.


Thank you,

Sergey



uploads/20060823_140813_CXTPTabControl.rar - uploads/20060823_140813_CXTPTabControl.rar



Replies:
Posted By: Oleg
Date Posted: 23 August 2006 at 3:00pm
1. Unfortnatelly SkinFramework don't support DrawThemeParentBackground, please try instead use standard WM_CTLCOLORSTATIC message:
 
 HBRUSH hBrush = (HBRUSH)GetParent()->SendMessage(WM_CTLCOLORSTATIC, (WPARAM)memDC.GetSafeHdc(), (LPARAM)m_hWnd);
 if (hBrush)
 {
  ::FillRect(memDC.GetSafeHdc(), rc, hBrush);
 }
 else
 {
  memDC.FillSolidRect(rc, GetXtremeColor(COLOR_3DFACE));
 }
 
2. Thanks good idea. We changed it to:
 
if (nItem == 0 && m_pSelected == NULL)


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



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