📄 exampleapp.h
字号:
// -------------------------------------------------------------------
//
// Filename: ExampleApp.h
// Description: Implements the CHighlightApp class which is the
// basis for the entire example application.
//
// -------------------------------------------------------------------
#if !defined(EXAMPLEAPP_H)
#define EXAMPLEAPP_H
#if _MSC_VER >= 1000
#pragma once
#endif
// SolidWorks includes
#include "SldWorks.h"
// --------------------------------
// Class: CHighlightApp
// --------------------------------
class CHighlightApp : public CObject
{
private:
// data members
LPSLDWORKS m_pSldWorks;
LPMODELDOC m_pActiveDoc;
bool m_bPartMenu;
bool m_bAssemblyMenu;
bool m_bDrawingMenu;
CObList m_EventList;
HINSTANCE m_hSaveInst;
CBitmap m_SmallToolbar;
CBitmap m_LargeToolbar;
long m_ToolbarId;
public:
// constructor/destructor
CHighlightApp(LPSLDWORKS pSldWorks);
~CHighlightApp();
// functionality
// load/unload application
bool StartApplication(void);
void TerminateApplication(void);
// helper
void ChangeActiveDoc(void);
void DestroyDoc(LPMODELDOC DocBeingDestroyed);
void SetSWApp(LPSLDWORKS pSldWorks);
LPSLDWORKS GetSWApp(void) { return m_pSldWorks;}
void SetResources();
void ResetResources();
// events
void AddEvent(CObject* swEventHandler);
bool RemoveEvent(CObject* swEventHandler);
CObList& GetEventList() {return m_EventList;}
// menus
void AddMenus(void);
void RemoveMenus(void);
//Toolbars
void AddToolbars(void);
void RemoveToolbars(void);
private:
void docCreateMenu(long DocumentType);
void docRemoveMenu(long DocumentType);
};
// the application object
extern CHighlightApp* TheApplication;
#endif
// --------------------------------
// End of ExampleApp.h
// --------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -