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

📄 listboxtip.h

📁 实效编程百例,包含了用vc开发的各方面的源代码。
💻 H
字号:
////////////////////////////////////////////////////////////////
// VCKBASE -- June 2001 
// Visual C++ 6.0 环境编译, Windows 98 和 NT 环境运行.
//
#pragma once

#include "subclass.h"
#include "puptext.h"

//////////////////
// Generic tip-handler to display tip for wide text in a list box.
// To use:
// - instantiate one of these for each list box
// - call Init
//
class CListBoxTipHandler : public CSubclassWnd {
protected:
	UINT	m_idMyControl;						 // id of list box control
	UINT	m_nCurItem;							 // index of current item
	BOOL	m_bCapture;							 // whether mouse is captured
	static CPopupText g_wndTip;			 // THE tip window

	// subclass window proc
	virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp);

	// virtual fns you can override
	virtual void OnMouseMove(CPoint p);
	virtual BOOL IsRectCompletelyVisible(const CRect& rc);
	virtual UINT OnGetItemInfo(CPoint p, CRect& rc, CString& s);

public:
	CListBoxTipHandler();
	~CListBoxTipHandler();
	static UINT g_nTipTimeMsec;			 // global: msec wait before showing tip
	void Init(CWnd* pListBox);				 // initialize
};

⌨️ 快捷键说明

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