?? cnumedit.h
字號:
#ifndef CNumEdit_h
#define CNumEdit_h 1
// afxwin
#include "afxwin.h"
// Edit control that only accepts and displays numeric
// input.
// The SetWindowText operation still works, so it is
// posible to place text in the control, it can just not be
// inputted by the user.
class CNumEdit : public CEdit
{
DECLARE_DYNAMIC(CNumEdit)
public:
CNumEdit ();
// set number of trailing digits after zero. i.e. set the
// presision of the values show.
void SetDigits (int noOfDigitsAfterZero);
// get Number of digits after zero
int GetDigits ();
// get the value of the edit control - assumes its a float,
// not just text.
virtual float GetValue ();
// set value in edit control, the input is validated first
virtual void SetValue (float x);
protected:
// responds to user input from keyboard
virtual void OnChar (UINT nChar, UINT nRepCnt, UINT nFlags);
// check to see that we only inpu x digits after zero.
virtual bool CheckInput (UINT nChar);
// Data Members for Class Attributes
int m_digits;
//{{AFX_MSG(CNumEdit)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -