Click here to Skip to main content
13,148,188 members (40,888 online)
Click here to Skip to main content


93 bookmarked
Posted 16 Nov 1999

Address Book

, 6 Aug 2000
Address Book application
#if !defined(AFX_GFXHEADERCTRL_H__31F5CEA9_E5CA_11D1_86E7_000000000000__INCLUDED_)
#define AFX_GFXHEADERCTRL_H__31F5CEA9_E5CA_11D1_86E7_000000000000__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// GfxHeaderCtrl.h : header file

// CGfxHeaderCtrl window

class CGfxHeaderCtrl : public CHeaderCtrl
// Construction

// Attributes
	DWORD	dwSortUp;
	DWORD	dwDontShowSortArrow, dwNoResizeColumn;
	int		m_nSortCol;	
	BOOL	m_bSortAsc;
	CImageList * pImageList;

	int SetSortImage(int nCol, BOOL bAsc);
	void SetSortOrder(const int iCol, const bool bAscending);
	bool GetSortOrder(const int iCol);

// Column dragging
	bool	bEnableDrag;
	BOOL	m_bCheckForDrag;	
	BOOL	m_bDragging;	
	int	*	m_pWidth;	
	int		m_nDragCol;
	int		m_nDropPos;	
	CRect	marker_rect;	
	void	(CWnd::*m_fpDragCol)(int &, int &);
//	CWnd	*m_pOwnerWnd;
	void	SetCallback(void (CWnd::*fpDragCol)(int &, int &));

	CBitmap bDragColumn;
	CRect	rcDragColumn, rcLastDragColumn;

// Operations

// Overrides
	// ClassWizard generated virtual function overrides
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);

// Implementation
	void DrawDragColumn(const int iCol);
	bool bIsDragAllowed;
	bool IsDragAllowed(CPoint point);
	virtual ~CGfxHeaderCtrl();

	// Generated message map functions
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg UINT OnNcHitTest(CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);



// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GFXHEADERCTRL_H__31F5CEA9_E5CA_11D1_86E7_000000000000__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Xavier John
Software Developer
United States United States
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170924.2 | Last Updated 7 Aug 2000
Article Copyright 1999 by Xavier John
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid