📄 hoopstestview.h
字号:
// hoopstestView.h : interface of the ChoopstestView class, derived from CHoopsView// Adds application specific members such as a QueryDialog and UI update/message maps#if !defined(AFX_ChoopstestView_H__FCA603FB_1694_11D2_B736_00805F85736F__INCLUDED_)#define AFX_ChoopstestView_H__FCA603FB_1694_11D2_B736_00805F85736F__INCLUDED_#if _MSC_VER >= 1000#pragma once#endif // _MSC_VER >= 1000// hoopstestView.h : header file//#include "CHoopsView.h"#include "MyBitmapButton.h"#define g 9.8#define PI 3.1415926class HhoopstestView;class HStreamFileToolkit;class HNetClientDlgBar;class HNetClient;////////////////////////////////////////////////////////////////////////////////// ChoopstestView viewclass ChoopstestView : public CHoopsView{protected: ChoopstestView(); // protected constructor used by dynamic creation DECLARE_DYNCREATE(ChoopstestView)// Attributespublic: // Operationspublic: HhoopstestView* GetSolidView() { return (HhoopstestView*)m_pHView; } // set current operator void LocalSetOperator(HBaseOperator *NewOperator); void LoadFile( LPCTSTR csFilePathName ); bool SaveFile( LPCTSTR csFilePathName ); void CleanUp(); // HNet bool CreateHNetClient(HNetClient* pHNetClient); bool DestroyHNetClient(); HNetClient* GetHNetClient();// Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(ChoopstestView) public: virtual void OnInitialUpdate(); protected: virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); //}}AFX_VIRTUALprivate:// Implementationprotected: virtual ~ChoopstestView();#ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const;#endif int FindMenuItem(CMenu* Menu, LPCTSTR MenuString); // HNetClient dialog bar HNetClientDlgBar* m_pHNetClientDlgBar; // Generated message map functionsprotected: //{{AFX_MSG(ChoopstestView) afx_msg void OnFileSaveAs(); afx_msg void OnZoom(); afx_msg void OnZoomToExtents(); afx_msg void OnZoomToWindow(); afx_msg void OnOrbit(); afx_msg void OnPan(); afx_msg void OnWindowSelect(); afx_msg void OnSelectionDeleteselection(); afx_msg void OnUpdateSelectionDeleteselection(CCmdUI* pCmdUI); afx_msg void OnUpdateGouraud(CCmdUI* pCmdUI); afx_msg void OnUpdateHiddenLine(CCmdUI* pCmdUI); afx_msg void OnUpdateOrbit(CCmdUI* pCmdUI); afx_msg void OnUpdatePan(CCmdUI* pCmdUI); afx_msg void OnUpdateWindowSelect(CCmdUI* pCmdUI); afx_msg void OnUpdateZoom(CCmdUI* pCmdUI); afx_msg void OnUpdateZoomToWindow(CCmdUI* pCmdUI); afx_msg void OnUpdateZoomToExtents(CCmdUI* pCmdUI); afx_msg void OnToolsRendermodeGouraudshaded(); afx_msg void OnToolsRendermodeHiddenline(); afx_msg void OnToolsRendermodeWireframe(); afx_msg void OnUpdateToolsRendermodeWireframe(CCmdUI* pCmdUI); afx_msg void OnUpdateToolsRendermodeGouraudshaded(CCmdUI* pCmdUI); afx_msg void OnUpdateToolsRendermodeHiddenline(CCmdUI* pCmdUI); afx_msg void OnFileLoad(); afx_msg void OnUpdateFileLoad(CCmdUI* pCmdUI); afx_msg void OnCreateSphere(); afx_msg void OnUpdateCreateSphere(CCmdUI* pCmdUI); afx_msg void OnCreateCone(); afx_msg void OnCreateCylinder(); afx_msg void OnUpdateCreateCone(CCmdUI* pCmdUI); afx_msg void OnUpdateCreateCylinder(CCmdUI* pCmdUI); afx_msg void OnLeftMenu1();
afx_msg void OnLeftMenu2();
afx_msg void OnLeftMenu3();
afx_msg void OnLeftMenu4();
afx_msg void OnDanbai1();
afx_msg void OnDanbai2();
afx_msg void OnDanbai3();
afx_msg void OnDanbai4();
afx_msg void OnTanhuang1();
afx_msg void OnTanhuang2();
afx_msg void OnTanhuang3();
afx_msg void OnTanhuang4();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void onEnterLab();
afx_msg void onLeaveLab();
afx_msg void OnUpdateDanbai1(CCmdUI *pCmdUI);
afx_msg void OnUpdateDanbai2(CCmdUI *pCmdUI);
afx_msg void OnUpdateDanbai3(CCmdUI *pCmdUI);
afx_msg void OnUpdateDanbai4(CCmdUI *pCmdUI);
afx_msg void OnUpdateTanhuang1(CCmdUI *pCmdUI);
afx_msg void OnUpdateTanhuang2(CCmdUI *pCmdUI);
afx_msg void OnUpdateTanhuang3(CCmdUI *pCmdUI);
afx_msg void OnUpdateTanhuang4(CCmdUI *pCmdUI);
afx_msg void OnUpdateLogin(CCmdUI *pCmdUI);
afx_msg void OnUpdateLogoff(CCmdUI *pCmdUI);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
//}}AFX_MSG DECLARE_MESSAGE_MAP() //void load(const char * filename);public:
// 自定义初始化函数。显示欢迎画面后执行
void MyInit(void);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
// 记录操作过程
void WriteToFile(const char* str, BOOL clean = FALSE);
//记录用户操作的日志文件的路径
CString userlog;
//用于记录用户信息的数据结构
typedef struct
{
CString sName;
CString sClass;
CString sBirthday;
CString sSex;
}userinfo;
//hoops中实体的HC_KEY
HC_KEY keyBall,keyBigBall,keySmallBall,keyLine,keyLongLine,keyShortLine,keyBigTanhuang,keySmallTanhuang,keyGO,keySTOP;
HC_KEY keyLeftButton1,keyLeftButton2,keyLeftButton3,keyLeftButton4;
//左侧菜单
BOOL bLeftMenu;
CMyBitmapButton cButton1,cButton2,cButton3,cButton4,cButtonLeave;
//单摆模拟用的物理量
float fLineLength,fPhase,fBallSize,Max; //线长,相位(角度),球的大小,振幅
DWORD tick;
//弹簧模拟用的物理量
float K,fScale;
CString sTanhuang;
//阻尼瞬时值
float R;
//实验进行的进度(状态)。1单摆介绍,2单摆猜猜,3单摆做做,4单摆想想,5单摆选择,6单摆模拟;21弹簧介绍,22弹簧猜猜...类同。
int state; //记录用户信息
userinfo user;
//记录用户的选择
CString sDanbaiGuess,sDanbaiThink,sTanhuangGuess,sTanhuangThink;
//记录实验的进度
int danbai_jindu,tanhuang_jindu;
//记录鼠标左键按下时的位置和单摆角度
CPoint down_point;
float degree;
//秒表
int sec;
// 停止一个模仿器
void StopSim(int nIDEvent);
afx_msg void OnSize(UINT nType, int cx, int cy);
};///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}// Microsoft Developer Studio will insert additional declarations immediately before the previous line.#endif // !defined(AFX_ChoopstestView_H__FCA603FB_1694_11D2_B736_00805F85736F__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -