Solidgraph.h
Upload User: kairuinn
Upload Date: 2009-02-07
Package Size: 2922k
Code Size: 2k
Category:

Graph program

Development Platform:

Visual C++

  1. // Solidgraph.h : main header file for the Solidgraph application
  2. //
  3. #pragma once
  4. #ifndef __AFXWIN_H__
  5. #error include 'stdafx.h' before including this file for PCH
  6. #endif
  7. #include "resource.h"       // main symbols
  8. // CSolidgraphApp:
  9. // See Solidgraph.cpp for the implementation of this class
  10. //
  11. #include "ReportEditor/DiagramEditor/DiagramClipboardHandler.h"
  12. #include "PluginsClasses//PluginLoader.h"
  13. #include "Dialogs//SceneTreeDlg.h"
  14. #include "Tools//RegManager.h"
  15. class CSolidgraphApp : public CWinApp,
  16. public ICoreAppInterface
  17. {
  18. public:
  19. CSolidgraphApp();
  20. ~CSolidgraphApp();
  21. CGlobalTree*       m_main_tree_control;
  22. CPluginLoader*     m_main_pluginer;
  23. CRegisterManager*  m_reg_manager;
  24. // Overrides
  25. public:
  26. virtual IProgresser*  GetProgresser();
  27. virtual ISceneTreeControl*   GetSceneTreeControl();  
  28. CDiagramClipboardHandler m_clip;
  29. virtual BOOL InitInstance();
  30. private:
  31. std::vector<CString>   m_FontsPathsArray; 
  32. CString    m_application_Path; 
  33. void    GetFontFiles(CString sPath);
  34. // Implementation
  35. afx_msg void OnAppAbout();
  36. DECLARE_MESSAGE_MAP()
  37. virtual int ExitInstance();
  38. virtual BOOL PreTranslateMessage(MSG* pMsg);
  39. public:
  40. void GetAppPath(CString& aa) {aa=m_application_Path;};
  41. };
  42. extern CSolidgraphApp    theApp;
  43. extern ICommander*       global_commander;
  44. extern bool              translate_messages_through_app;
  45. extern int               group_name_index;
  46. class AppDllInstanceSwitcher
  47. {
  48. public:
  49. AppDllInstanceSwitcher()
  50. {
  51. m_hInst = AfxGetResourceHandle();
  52. AfxSetResourceHandle(theApp.m_hInstance);
  53. }
  54. ~AppDllInstanceSwitcher()
  55. {
  56. AfxSetResourceHandle(m_hInst);
  57. }
  58. private:
  59. HINSTANCE m_hInst;
  60. };
  61. #define APP_SWITCH_RESOURCE  AppDllInstanceSwitcher __SwitchInstance;
  62. sgCObject*   GetObjectTopParent(const sgCObject* ob);
  63. CRect        FitFirstRectToSecond(CSize& fitSz, CRect& windRect);
  64. CString      GetLeftHalfOfString(UINT nID);
  65. void         DrawGroupFrame(CDC* pDC, const CRect& rct, 
  66.  const int leftLab, const int rightLab);