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

📄 mainfrm.h

📁 用VC++开发了一个数控加工的三维仿真程序
💻 H
字号:
// MainFrm.h : CMainFrame 类的接口
//


#pragma once

#include "TaskPane.h"
#include "OutputBar.h"
#include "WorkSpaceBar.h"
#include "SplitterWndEx.h"
#include "NCDialogBar.h"
#include "NCCodeParse.h"


#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoTranslation.h>
#include <Inventor/nodes/SoText2.h>


class CNCSynSimulaSocket;
class CNCMessage;

class CMainFrame : public CBCGPMDIFrameWnd, public CIvfExaminerViewer
{
	DECLARE_DYNAMIC(CMainFrame)
public:
	CMainFrame();

// 属性
public:

// 操作
public:

// 重写
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

// 实现
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

public:   // 控件条嵌入成员
	int i;
	CBCGPMenuBar		m_wndMenuBar;
	CBCGPToolBar		m_wndToolBar;
	CBCGPToolBar		m_wndToolbarEdit;
	CBCGPToolBar		m_wndToolbarSimula;
	CBCGPStatusBar		m_wndStatusBar;
	CTaskPane       	m_wndTaskPane;
	CWorkSpaceBar       m_wndWorkSpace;

	CBCGPToolBarImages	m_UserImages;

	CSplitterWndEx		m_wndSplitter;
	CNCDialogBar		m_wndDialogBar;

	CNCCodeParse		m_NCCodeParse;

	CArray<CString,CString> m_ArrayCodeByLine;
	CArray<CString,CString> m_ArrayForwardDirection_CodeLineInterpolation;
	int m_iLineNowInterpolation;		// 说明已经插补到第几行.
	int m_iNowStep;		//说明已经进给到第几步.
	SoSeparator *m_root;		//场景根节点.
	SoTranslation *m_tools_trans;	//刀具位移节点,相对于坐标原点的位移.
	SoTranslation *m_coords_trans;		//坐标显示节点,相对于坐标原点的位移.
	SoSeparator *simula_sep;		//动态仿真节点.
	SoText2 *coords_text;		//坐标显示的Text节点.

	float m_fScale_display;	//动态显示的比例因子.
	float m_fScale_coordinate;	//坐标计算的比例因子.
	float m_fCoordinate_relative[3];	//NC代码解析出的当前相对位置坐标.
	float m_fCoordinate_absolute[3];	//NC代码解析出的当前绝对位置坐标.
	bool m_bSimulaHaveStart;		//仿真是否开始标志,该标志用来暂停操作.
	UINT  m_uID_simulatoolbar;

// 生成的消息映射函数
protected:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnViewCustomize();
	afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
	void OnToolsViewUserToolbar (UINT id);
	void OnUpdateToolsViewUserToolbar (CCmdUI* pCmdUI);
	afx_msg void OnAppLook(UINT id);
	afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
	afx_msg void OnClose();
	afx_msg	void OnLogonSynSimulaServer();
	afx_msg void OnUpdateLogonSynSimulaServer(CCmdUI* pCmdUI);
	afx_msg void OnLogoutSynSimulaServer();
	afx_msg void OnUpdateLogoutSynSimulaServer(CCmdUI* pCmdUI);
	afx_msg void OnRefleshSynSimulaClientList();
	afx_msg void OnStartSynSimula();
	afx_msg void OnUpdateStartSynSimula(CCmdUI* pCmdUI);
	afx_msg void OnTaskPaneServerFileToolBarItemSel(UINT nID);
//	afx_msg void OnUpdateTaskPaneServerFileToolBarItemSel(CCmdUI* pCmdUI);
	afx_msg void OnLogonFileServer();
	afx_msg void OnUpdateLogonFileServer(CCmdUI* pCmdUI);
	afx_msg void OnLogoutFileServer();
	afx_msg void OnUpdateLogoutFileServer(CCmdUI* pCmdUI);
	afx_msg void OnSimulaToolbarItemSel(UINT nID);
	afx_msg void OnUpdateSimulaToolbarItemSel(CCmdUI* pCmdUI);

	DECLARE_MESSAGE_MAP()

	virtual CBCGPMDIChildWnd* CreateDocumentWindow (LPCTSTR lpcszDocName, CObject* /*pObj*/);

	UINT	m_nAppLook;

private:
	void UpdateMDITabs (BOOL bResetMDIChild);
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	void InterpolationAndDisplay(void);
	void InitDynamicDisplayModule(void);

public:
	void SynSimulaProcess(void);
};

⌨️ 快捷键说明

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