![]() |
CXTPTabControl questions |
Post Reply
|
| Author | |
SergeyS
Newbie
Joined: 23 August 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPTabControl questionsPosted: 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.
Thank you, Sergey uploads/20060823_140813_CXTPTabControl.rar |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
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 |