ExToolBarDoc.cpp
上传用户:trjx11
上传日期:2021-03-01
资源大小:158k
文件大小:3k
源码类别:

工具条

开发平台:

Visual C++

  1. // ExToolBarDoc.cpp : implementation of the CExToolBarDoc class
  2. //
  3. #include "stdafx.h"
  4. #include "ExToolBar.h"
  5. #include "ExToolBarDoc.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CExToolBarDoc
  13. IMPLEMENT_DYNCREATE(CExToolBarDoc, CDocument)
  14. BEGIN_MESSAGE_MAP(CExToolBarDoc, CDocument)
  15. //{{AFX_MSG_MAP(CExToolBarDoc)
  16. // NOTE - the ClassWizard will add and remove mapping macros here.
  17. //    DO NOT EDIT what you see in these blocks of generated code!
  18. //}}AFX_MSG_MAP
  19. END_MESSAGE_MAP()
  20. BEGIN_DISPATCH_MAP(CExToolBarDoc, CDocument)
  21. //{{AFX_DISPATCH_MAP(CExToolBarDoc)
  22. // NOTE - the ClassWizard will add and remove mapping macros here.
  23. //      DO NOT EDIT what you see in these blocks of generated code!
  24. //}}AFX_DISPATCH_MAP
  25. END_DISPATCH_MAP()
  26. // Note: we add support for IID_IExToolBar to support typesafe binding
  27. //  from VBA.  This IID must match the GUID that is attached to the 
  28. //  dispinterface in the .ODL file.
  29. // {298735F5-FF1C-11D1-8A9F-000000000000}
  30. static const IID IID_IExToolBar =
  31. { 0x298735f5, 0xff1c, 0x11d1, { 0x8a, 0x9f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } };
  32. BEGIN_INTERFACE_MAP(CExToolBarDoc, CDocument)
  33. INTERFACE_PART(CExToolBarDoc, IID_IExToolBar, Dispatch)
  34. END_INTERFACE_MAP()
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CExToolBarDoc construction/destruction
  37. CExToolBarDoc::CExToolBarDoc()
  38. {
  39. // TODO: add one-time construction code here
  40. EnableAutomation();
  41. AfxOleLockApp();
  42. }
  43. CExToolBarDoc::~CExToolBarDoc()
  44. {
  45. AfxOleUnlockApp();
  46. }
  47. BOOL CExToolBarDoc::OnNewDocument()
  48. {
  49. if (!CDocument::OnNewDocument())
  50. return FALSE;
  51. // TODO: add reinitialization code here
  52. // (SDI documents will reuse this document)
  53. return TRUE;
  54. }
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CExToolBarDoc serialization
  57. void CExToolBarDoc::Serialize(CArchive& ar)
  58. {
  59. if (ar.IsStoring())
  60. {
  61. // TODO: add storing code here
  62. }
  63. else
  64. {
  65. // TODO: add loading code here
  66. }
  67. }
  68. /////////////////////////////////////////////////////////////////////////////
  69. // CExToolBarDoc diagnostics
  70. #ifdef _DEBUG
  71. void CExToolBarDoc::AssertValid() const
  72. {
  73. CDocument::AssertValid();
  74. }
  75. void CExToolBarDoc::Dump(CDumpContext& dc) const
  76. {
  77. CDocument::Dump(dc);
  78. }
  79. #endif //_DEBUG
  80. /////////////////////////////////////////////////////////////////////////////
  81. // CExToolBarDoc commands