Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Skin Framework and CHeaderCtrl problem?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skin Framework and CHeaderCtrl problem?

 Post Reply Post Reply
Author
Message
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Topic: Skin Framework and CHeaderCtrl problem?
    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

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.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.