ctooltip.hpp

来自「bt848,bt878 a采集卡的探测」· HPP 代码 · 共 39 行

HPP
39 行
字号
// Our ToolTip Window
#ifndef _CTOOLTIP_HPP
#define _CTOOLTIP_HPP

#include "CWnd.hpp"
#include <windows.h>
#define _WIN32_IE 0x0400
#include <commctrl.h>
#include <commdlg.h>

class CToolTip {

protected:
	CWnd					ttw;				// The tooltip window

public:
	// Create our Tooltip
	CToolTip() {}
	CToolTip(HINSTANCE Instance,CWnd& father);

	// To create
	bool Create(HINSTANCE Instance,CWnd& father);

	// To add control references to the ToolTip 
	// so those controls get tooltips. Be carefull, Text must point to
	// a static buffer!
	bool Register(CWnd& control,LPTSTR Text);

	// To set the max tip width
	int SetMaxTipWidth(int max) { return ttw.SendMessage(TTM_SETMAXTIPWIDTH,(WPARAM)0,(LPARAM)max); }
	void SetAutoPopTime(int Time) { ttw.SendMessage(TTM_SETDELAYTIME,(WPARAM)(DWORD)TTDT_AUTOPOP, (LPARAM)(INT) MAKELONG(Time,0)); }
	void SetInitialTime(int Time) { ttw.SendMessage(TTM_SETDELAYTIME,(WPARAM)(DWORD)TTDT_INITIAL, (LPARAM)(INT) MAKELONG(Time,0)); }
	void SetReShowTime(int Time) { ttw.SendMessage(TTM_SETDELAYTIME,(WPARAM)(DWORD)TTDT_RESHOW, (LPARAM)(INT) MAKELONG(Time,0)); }


};


#endif

⌨️ 快捷键说明

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