?? basetabctrl1.h
字號:
#include "myfunction.h"
#include <afxcoll.h>
#if !defined(AFX_BASETABCTRL1_H__025AC0EE_A22A_472F_A6ED_34973D14FC1C__INCLUDED_)
#define AFX_BASETABCTRL1_H__025AC0EE_A22A_472F_A6ED_34973D14FC1C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// BaseTabCtrl1.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CBaseTabCtrl window
#define MYMESSAGE_BAOCUNCLICK WM_USER +20
#define MYMESSAGE_ZENGJIACLICK WM_USER +21
#define MYMESSAGE_SHANCHUCLICK WM_USER +22
#define MYMESSAGE_XIUGAICLICK WM_USER +23
#define MYMESSAGE_CHAXUN WM_USER +24
#define MYMESSAGE_EDITRETURN WM_USER +25
#define MYMESSAGE_FIELDRETURN WM_USER +26
#define MYMESSAGE_FUHAORETURN WM_USER +27
#define MYMESSAGE_RQRETURN WM_USER +28
#define MYMESSAGE_CHECKCHANGE WM_USER +29
class CBaseTabCtrl : public CTabCtrl
{
// Construction
public:
CBaseTabCtrl(int nfield);
// Attributes
public:
enum{ID_STATICS_1=121}; //靜態(tài)文本
enum{ID_EDITS_1=161}; //編輯框用來顯示值
enum{ID_TABLIST=200}; //列表框,顯示紀錄
enum{ID_BUTTONS_1=201}; //保存,刪除,添加,取消,修改按鈕
enum{ID_CHECK=211}; //是否在查詢結(jié)果中查詢
enum{ID_BUTTONCHAXUN=212}; //查詢按鈕
enum{ID_EDITVALUE=213}; //用戶輸入的查詢條件
enum{ID_COMBOFIELDS=214}; //顯示查詢字段
enum{ID_COMBOFUHAO=215}; //顯示查詢符號
enum{ID_TIMECONTROL=216}; //用來查詢時間
enum{RQQUERY=0,STRINGQUERY=1}; //區(qū)別時間查詢,編輯框查詢
enum{NORMAL=0,ZENGJIA=1,XIUGAI=2,SHANCHU=3};//當前的狀態(tài)
public:
//base info
const int mc_iNumber; //記錄編輯框和靜態(tài)文本的個數(shù)
CStatic* m_statics; //靜態(tài)文本
CEdit* m_edits; //編輯框用來顯示值
CButton* m_btn; //保存,刪除,添加,取消,修改按鈕
//list info
CListCtrl* m_list; //列表框,顯示紀錄
CButton m_btnchaxun; //查詢按鈕
CComboBox m_combofields; //顯示查詢字段
CComboBox m_combofuhao; //顯示查詢符號
CEdit m_editvalue; //用戶輸入的查詢條件
CDateTimeCtrl m_tcvalue; //用來查詢時間
CButton m_check; //是否在查詢結(jié)果中查詢
CString m_sFuhao[6]; //保存各種查詢符號
//list state;
int state; //RQQUERY=0,STRINGQUERY=1
CString key_field; //?
CString key_value; //?
int key_index; //?
//baseinfo state;
int baseinfo_state; //NORMAL=0,ZENGJIA=1,XIUGAI=2,SHANCHU=3
//sql query
CString m_sTable; //用來查詢的視圖
CString m_sTempTables[2]; //查詢用的臨時表
int m_iCurTable; //標識當前的臨時表
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CBaseTabCtrl)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
public:
void SetListFocus(MSG* pMsg);
virtual void SetTheBaseInfoFocus();//控制編輯框的焦點移動順序
bool InitBtn();
bool SetStaticNumber(int n);
void SetEditNumber(int n);
BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );
virtual ~CBaseTabCtrl();
// Generated message map functions
protected:
virtual int ShowListChaXun(int show);
virtual void SetTheFocus(); //控制按鈕的焦點移動順序
virtual bool EnableBaseInfo(bool enabled);
virtual int ShowBaseInfo(int show);
virtual void OnListReturn();
virtual bool PrepareTables(CString& output,CString& input);
virtual CString PrepareSQL();
virtual bool InitValues();
virtual bool RefreshListView(CString sql);
virtual void OnComboFieldReturn();
virtual void SetKey(int mark);
virtual void OnRqValueReturn();
virtual void OnEditValueReturn();
virtual void OnComboFuhaoReturn();
virtual bool InitList();
virtual bool InitBaseInfo();
virtual bool InitSelf();
//{{AFX_MSG(CBaseTabCtrl)
afx_msg void OnSelchange(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDblclkList(NMHDR* pNMHDR, LRESULT* pResult) ;
afx_msg void OnChaXun();
afx_msg void OnCheckClick();
afx_msg void OnCancelClick();
afx_msg void OnXiuGaiClick();
afx_msg void OnShanChuClick();
afx_msg void OnZengJiaClick();
afx_msg void OnBaoCunClick();
afx_msg void OnSelendokComboFields();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_BASETABCTRL1_H__025AC0EE_A22A_472F_A6ED_34973D14FC1C__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -