📄 tip_dlg.h
字号:
#ifndef _TIP_DLG_H
#define _TIP_DLG_H
template<class T>
class tip_dlg: public T
{
CToolTipCtrl tip_ctrl;
public:
tip_dlg(UINT idd, CWnd* parent): T(idd, parent) {}
protected:
typedef tip_dlg<T> baseclass;
void addtip(UINT idc, UINT ids)
{
CString str;
if( str.LoadString(ids) )
{
addtip(idc, str);
}
}
void addtip(UINT idc, LPCTSTR tip)
{
CWnd* x = GetDlgItem(idc);
if( x )
{
if( !tip_ctrl.m_hWnd )
{
tip_ctrl.Create(this);
tip_ctrl.Activate(TRUE);
}
tip_ctrl.AddTool(x, tip);
}
}
virtual BOOL PreTranslateMessage(MSG* pMsg)
{
if( tip_ctrl.m_hWnd )
tip_ctrl.RelayEvent(pMsg);
return T::PreTranslateMessage(pMsg);
}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -