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

📄 ltguionoffctrl.h

📁 Blood 2全套源码
💻 H
字号:
// LTGUIOnOffCtrl.h: interface for the CLTGUIOnOffCtrl class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LTGUIONOFFCTRL_H__B4C56631_617A_11D2_BDA7_0060971BDC6D__INCLUDED_)
#define AFX_LTGUIONOFFCTRL_H__B4C56631_617A_11D2_BDA7_0060971BDC6D__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "LTGUIColumnTextCtrl.h"

class CLTGUIOnOffCtrl : public CLTGUIColumnTextCtrl  
{
public:
	CLTGUIOnOffCtrl();
	virtual ~CLTGUIOnOffCtrl();

	// Create the control
	// pClientDE		  - Pointer to the client interface.	
	// hString			  - Handle of a string to copy the text from for the control.
	// pFont			  - The font to use for rendering the strings.
	// nRightColumnOffset - The number of pixels from the left edge that the on/off text is	
	// pbValue			  - Value to store the on/off status in when UpdateData is called
	DBOOL			Create ( CClientDE *pClientDE, HSTRING hString, CLTGUIFont *pFont,
							 int nRightColumnOffset, DBOOL *pbValue=DNULL);

	// Update data
	void			UpdateData(DBOOL bSaveAndValidate=DTRUE);

	// Sets/gets the on/off status
	DBOOL			IsOn()				{ return m_bOn; }
	void			SetOn(DBOOL bOn);

	// Left and Right key presses
	void			OnLeft()			{ SetOn(!IsOn()); }
	void			OnRight()			{ SetOn(!IsOn()); }

protected:
	DBOOL			m_bOn;
	DBOOL			*m_pbValue;		// Value to store the on/off status in when UpdateData is called.
};

#endif // !defined(AFX_LTGUIONOFFCTRL_H__B4C56631_617A_11D2_BDA7_0060971BDC6D__INCLUDED_)

⌨️ 快捷键说明

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