Print Page | Close Window

Skin Framework and CHeaderCtrl problem?

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=10401
Printed Date: 15 November 2025 at 1:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Skin Framework and CHeaderCtrl problem?
Posted By: MacW
Subject: Skin Framework and CHeaderCtrl problem?
Date Posted: 29 April 2008 at 11:05am
Hi,

today I attempted to use a CXTPHeaderCtrl in a window inside a CXTPResizeDlg-derived dialog box. I create the header control (it is *NOT* associated with a List Control) as follows:

m_Header.Create(WS_CHILD | WS_VISIBLE | HDS_HORZ | HDS_DRAGDROP | HDS_FULLDRAG | HDS_HOTTRACK,CRect(0,0,0,0),this,ID_HEADER);
m_Header.InitializeHeader(FALSE);


I add a couple of colums. The header control displays OK, and things like column resizing etc. work fine.

But ss soon as I attempt to drag a column in the header with the mouse, I get strange asserts all over MFC. The call stack shows that the source of the problem seems to the the skin framework hooks. I have attached a call stack.

uploads/20080429_110341_cs.zip - uploads/20080429_110341_cs.zip

This is a dialog based test application. Perhaps this is the reason? But other dialog boxes spawned by this app are skinned correctly, and other CJ controls work fine.



Replies:
Posted By: Oleg
Date Posted: 01 May 2008 at 2:13am
Hello,
 
It doesn't related to SkinFramework.
 
Problem that CXTHeaderCtrl doesn't implement DrawItem notification and you have HDF_OWNERDRAW flag for items.
 
When you add items be sure you zero all field:
 
 HDITEM h;
 ZeroMemory(&h, sizeof(h));
 h.mask = HDI_TEXT;
 h.pszText = "Test";
 m_Header.InsertItem(0, &h);


-------------
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