예제 #1
0
//*****************************************************************************
//*
//*		Create
//*
//*****************************************************************************
//	Creates a new Tree-List-Control
//	dwStyle		: Style of the Window
//					TVS_CHECKBOXES
//					TVS_DISABLEDRAGDROP
//					TVS_EDITLABELS
//					TVS_FULLROWSELECT
//					TVS_HASBUTTONS
//					TVS_HASLINES
//					TVS_INFOTIP
//					TVS_LINESATROOT
//					TVS_NONEVENHEIGHT
//					TVS_NOSCROLL
//					TVS_NOTOOLTIPS
//					TVS_RTLREADING
//					TVS_SHOWSELALWAYS
//					TVS_SINGLEEXPAND
//					TVS_TRACKSELECT
//	sRect		: Rectangle where the window should be shown
//	pParentWnd	: Pointer to parent window
//	nId			: Is the ID of the window
//	Returns TRUE if the window was created or FALSE if an error occurs
BOOL CTreeListCtrl::Create(DWORD dwStyle, const RECT &sRect, CWnd *pParentWnd, UINT nId) {

	TreeListRegister(AfxGetInstanceHandle());


	return CWnd::Create(_T("TreeList"), NULL, dwStyle, sRect, pParentWnd, nId);
}
예제 #2
0
//*****************************************************************************
//*
//*		Create
//*
//*****************************************************************************
//	Creates a new Tree-List-Control
//	dwStyle		: Style of the Window
//					TVS_CHECKBOXES
//					TVS_DISABLEDRAGDROP
//					TVS_EDITLABELS
//					TVS_FULLROWSELECT
//					TVS_HASBUTTONS
//					TVS_HASLINES
//					TVS_INFOTIP
//					TVS_LINESATROOT
//					TVS_NONEVENHEIGHT
//					TVS_NOSCROLL
//					TVS_NOTOOLTIPS
//					TVS_RTLREADING
//					TVS_SHOWSELALWAYS
//					TVS_SINGLEEXPAND
//					TVS_TRACKSELECT
//	sRect		: Rectangle wher the window should be shown
//	pParentWnd	: Pointer to parent window
//	nId			: Is the ID of the window
//	Returns TRUE if the window was created or FALSE if an error occurs
BOOL CTreeListCtrl::Create(DWORD dwStyle, const RECT &sRect, CWnd* pParentWnd,UINT nId)
{

	TreeListRegister();

	BOOL fRet = CWnd::Create(_T("TreeList"),NULL,dwStyle,sRect,pParentWnd,nId);
	
	// Install the WH_GETMESSAGE hook function
	g_hHook = ::SetWindowsHookEx(	WH_GETMESSAGE,
									GetMessageProc,
									AfxGetInstanceHandle(),
									GetCurrentThreadId() );
	ASSERT   (g_hHook);

	return fRet;
}