InteractiveSQLDoc.cpp
上传用户:jsxglz
上传日期:2007-01-03
资源大小:117k
文件大小:2k
源码类别:

SQL Server

开发平台:

Visual C++

  1. // InteractiveSQLDoc.cpp : implementation of the CInteractiveSQLDoc class
  2. //
  3. #include "stdafx.h"
  4. #include "InteractiveSQL.h"
  5. #include "InteractiveSQLDoc.h"
  6. #include "CntrItem.h"
  7. #include "MainFrm.h"
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CInteractiveSQLDoc
  15. IMPLEMENT_DYNCREATE(CInteractiveSQLDoc, CRichEditDoc)
  16. BEGIN_MESSAGE_MAP(CInteractiveSQLDoc, CRichEditDoc)
  17. //{{AFX_MSG_MAP(CInteractiveSQLDoc)
  18. //}}AFX_MSG_MAP
  19. // Enable default OLE container implementation
  20. ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, CRichEditDoc::OnUpdateEditLinksMenu)
  21. ON_COMMAND(ID_OLE_EDIT_LINKS, CRichEditDoc::OnEditLinks)
  22. ON_UPDATE_COMMAND_UI(ID_OLE_VERB_FIRST, CRichEditDoc::OnUpdateObjectVerbMenu)
  23. END_MESSAGE_MAP()
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CInteractiveSQLDoc construction/destruction
  26. CInteractiveSQLDoc::CInteractiveSQLDoc()
  27. {
  28. m_bRTF = FALSE;
  29. }
  30. CInteractiveSQLDoc::~CInteractiveSQLDoc()
  31. {
  32. }
  33. BOOL CInteractiveSQLDoc::OnNewDocument()
  34. {
  35. if(!CRichEditDoc::OnNewDocument())
  36. return FALSE;
  37. return TRUE;
  38. }
  39. CRichEditCntrItem* CInteractiveSQLDoc::CreateClientItem(REOBJECT* preo) const
  40. {
  41. // cast away constness of this
  42. return new CInteractiveSQLCntrItem(preo, (CInteractiveSQLDoc*) this);
  43. }
  44. /////////////////////////////////////////////////////////////////////////////
  45. // CInteractiveSQLDoc serialization
  46. void CInteractiveSQLDoc::Serialize(CArchive& ar)
  47. {
  48. // Calling the base class CRichEditDoc enables serialization
  49. //  of the container document's COleClientItem objects.
  50. CRichEditDoc::Serialize(ar);
  51. }
  52. /////////////////////////////////////////////////////////////////////////////
  53. // CInteractiveSQLDoc diagnostics
  54. #ifdef _DEBUG
  55. void CInteractiveSQLDoc::AssertValid() const
  56. {
  57. CRichEditDoc::AssertValid();
  58. }
  59. void CInteractiveSQLDoc::Dump(CDumpContext& dc) const
  60. {
  61. CRichEditDoc::Dump(dc);
  62. }
  63. #endif //_DEBUG
  64. /////////////////////////////////////////////////////////////////////////////
  65. // CInteractiveSQLDoc commands