⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 swlist.h

📁 <VC++网络游戏建摸与实现>源代码
💻 H
字号:
////////////////////////////////////////////////////////////////
#if !defined(AFX_FAVORLIST_H__52EFAD4F_D1D7_11D4_BEC4_E6CA67B86945__INCLUDED_)
#define AFX_FAVORLIST_H__52EFAD4F_D1D7_11D4_BEC4_E6CA67B86945__INCLUDED_
/*//////////////////////////////////////////////////////////////

Copyright(c) 2000, Masoud Samimi - All Rights Reserved.

File:		FavorList.h - header file of favorite list box
History:	Created 14/12/2000 (dd/mm/yyyy)

Used for:	Loads all your favorites URLs from the 
			windows favorites directory "C:\windows\favorites"
			and adds/displays them inside the list box

Deriving:	This class can be used as a base class to your own 
			derived class inorder to have your own specialized
			AddString(you rown stuff) by just overriding one 
			virtual function, the PreSubclassWindow() funtion.

Notes:		This class and the code is freely destributed, you
			cannot sell it. You can modify to fit your own
			style, but you will have to mention your changes and
			your name here in the changes log below!

			Whatever you do, please do not remove this info header
			from the files.
			

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Changes:	---->
By:			---->

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
	List of further enhancements:
	
	  1. To add all the subdiretctory URLs as well.

	  2. To add a tree control! if possible, to have
	     the top level directories as expandable parents 
		 and the URLs files as children.
		 ( Something like the Windows Explorer! )

	  3. Add your wishes! :)
		  
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


///////////////////////////////////////////////////////////////*/

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

/////////////////////////////////////////////////////////////////////////////
// CMyToolTipCtrl

class CMyToolTipCtrl : public CToolTipCtrl
{
// Construction
public:
	CMyToolTipCtrl();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyToolTipCtrl)
	//}}AFX_VIRTUAL

// Implementation
public:
	BOOL AddWindowTool (CWnd* pWnd, LPCTSTR pszText);
	virtual ~CMyToolTipCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CMyToolTipCtrl)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
// CFavorList window


class CFavorList : public CListBox
{
// Construction
public:
	CFavorList();

// Attributes
protected:

	HCURSOR hCursor;

	CBrush backBrush;	// brush of the background color
	CBrush OldBrush;
	

	CMyToolTipCtrl	m_ctlTT;
	
// Operations
protected:

	int GetFavoritesDirectory();
	void LoadFiles();
	void EnumerateFolders ();

	unsigned char szFavoritesDir [MAX_PATH], m_strPath [MAX_PATH] ;
	char szBuffer [80];
	int iReturn;
	LONG lReturn;
	HKEY hKey;
	DWORD dwType, dwLength;
	WIN32_FIND_DATA fd;
	HANDLE hFind;
		
protected:

	virtual void PreSubclassWindow();
	virtual HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);

// Implementation
public:
	virtual ~CFavorList();

	// Generated message map functions
protected:
	//{{AFX_MSG(CFavorList)
	afx_msg void OnSelchange();
	afx_msg void OnDestroy();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnDblclk();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FAVORLIST_H__52EFAD4F_D1D7_11D4_BEC4_E6CA67B86945__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -