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

📄 tbareditctrlint.h

📁 BCAM 1394 Driver
💻 H
字号:
//-----------------------------------------------------------------------------
//  (c) 2002 by Basler Vision Technologies
//  Section:  Vision Components
//  Project:  BCAM
//  $Header: TBarEditCtrlInt.h, 2, 02.10.2002 14:31:30, Nebelung, H.$
//-----------------------------------------------------------------------------
/**
  \file     TBarEditCtrlInt.h
  \brief    interface for the CTBarEditCtrlInt class.
*/

#if !defined(AFX_TBAREDITCTRLINT_H__7158A076_F90C_11D4_8EF4_00105AC44283__INCLUDED_)
#define AFX_TBAREDITCTRLINT_H__7158A076_F90C_11D4_8EF4_00105AC44283__INCLUDED_

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

#include "TBarEditCtrlBase.h"

//////////////////////////////////////////////////////////////////////
// 

class CTBarEditCtrlInt : public CTBarEditCtrlBase  
{
public:
  typedef int (*FMTVAL)           (char *szBuffer, int nValue, int nWidth, int nPrecision);
  
private:
  FMTVAL                                                                                m_pFmtFnc;
  
  int                                                                                   m_nLineSize;
  int                                                                                   m_nPageSize;
  
public:
  CTBarEditCtrlInt(bool bPostMsgEnabled = true);
  virtual                                                                               ~CTBarEditCtrlInt();
  
  // overridden CTrackBarCtrl methods
  bool                                                                                  SetRangeMin(int nRangeMin, bool bRedraw = true);
  bool                                                                                  SetRangeMax(int nRangeMax, bool bRedraw = true);
  bool                                                                                  SetRange(int nRangeMin, int nRangeMax, bool bRedraw = true);
  
  int                                                                                   GetRangeMin() const;
  int                                                                                   GetRangeMax() const;
  void                                                                                  GetRange(int& nMin, int& nMax) const;
  
  bool                                                                                  SetValue(int nValue, bool bTrackThumb = true);
  bool                                                                                  DDXValue(UINT nID, int &nValue, BOOL bSave, BOOL bValidate = false);
  bool                                                                                  DDXValue(UINT nID, long &nValue, BOOL bSave, BOOL bValidate = false);
  
  /// GetValue - Get the value
  int                                                                                   GetValue();
  
  int                                                                                   SetLineSize(int nLogSize);
  int                                                                                   GetLineSize(void);
  int                                                                                   SetPageSize(int nLogSize);
  int                                                                                   GetPageSize(void);
  
  /// Set pointer to function that is called to format the output
  bool                                                                                  SetFormatFnc(FMTVAL pFmtFnc) { m_pFmtFnc = pFmtFnc; };
  
  // overridden CTBarEditCtrlBase methods
  bool                                                                                  GoCenterValue();
  void                                                                                  SetPrecision(int nPrecision, int nWidth = 0);
  
private:
  
  bool                                                                                  InternalSetValue(int nValue, bool bTrackThumb = true);
  
  // overridden CTBarEditCtrlBase methods
  bool                                                                                  LimitValue();
  void                                                                                  UpdateValue();
  bool                                                                                  UpdateEditText();
  void                                                                                  UndoInput();
  LRESULT                                                                               HScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  
  // overridden CTBarCtrlBase methods
  bool                                                                                  UpdateRange(bool bRedraw /*= true*/);
  void                                                                                  UpdateRangeText();
  bool                                                                                  NotifyRangeChanged(bool bRedraw = true);
  
  int                                                                                   FmtValue(char *szBuf, int nValue);
  int                                                                                   FmtValue(char *szBuf, double dValue) { return 0; };
};

#endif // !defined(AFX_TBAREDITCTRLINT_H__7158A076_F90C_11D4_8EF4_00105AC44283__INCLUDED_)

⌨️ 快捷键说明

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