GME
13
|
00001 //{{AFX_INCLUDES() 00002 #include "console.h" 00003 //}}AFX_INCLUDES 00004 00005 #pragma once 00006 // GMEConsole.h : header file 00007 // 00008 00010 // CGMEConsole dialog 00011 00012 class CGMEConsole : public CDockablePane 00013 { 00014 // Construction 00015 public: 00016 CGMEConsole(CWnd* pParent = NULL); // standard constructor 00017 virtual ~CGMEConsole(){theInstance = 0;}; 00018 00019 void Clear(); 00020 void Message(CString str, short type); 00021 CString GetContents(); 00022 void SetContents(const CString& contents); 00023 void SetGMEApp(IDispatch *idp); 00024 void SetGMEProj(IDispatch *idp); 00025 void NavigateTo(CString url); 00026 00027 // Dialog Data 00028 //{{AFX_DATA(CGMEConsole) 00029 enum { IDD = IDD_CONSOLE_DIALOG }; 00030 CConsole m_Console; 00031 //}}AFX_DATA 00032 00033 static CGMEConsole *theInstance; 00034 00035 IDispatch * GetInterface() 00036 { 00037 LPUNKNOWN pUnk = m_Console.GetControlUnknown(); 00038 00039 // From there get the IDispatch interface of control. 00040 LPDISPATCH pDisp = NULL; 00041 pUnk->QueryInterface(IID_IDispatch, (LPVOID*)&pDisp); 00042 return pDisp; 00043 }; 00044 00045 // Overrides 00046 // ClassWizard generated virtual function overrides 00047 //{{AFX_VIRTUAL(CGMEConsole) 00048 protected: 00049 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 00050 //}}AFX_VIRTUAL 00051 00052 // Implementation 00053 protected: 00054 00055 // Generated message map functions 00056 //{{AFX_MSG(CGMEConsole) 00057 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 00058 afx_msg void OnSize(UINT nType, int cx, int cy); 00059 afx_msg void OnClickMGAIDConsoleCtrl(LPCTSTR objid); 00060 DECLARE_EVENTSINK_MAP() 00061 //}}AFX_MSG 00062 DECLARE_MESSAGE_MAP() 00063 00064 virtual BOOL PreTranslateMessage(MSG* pMsg) 00065 { 00066 __int64 ret = 0; 00067 m_Console.InvokeHelper(0x43576E64 /* magic from ConsoleCtl.cpp */, DISPATCH_PROPERTYGET, VT_I8, (void*)&ret, 0); 00068 CWnd* cwnd = (CWnd*)(void*)ret; 00069 return cwnd->PreTranslateMessage(pMsg); 00070 } 00071 00072 }; 00073 00074 //{{AFX_INSERT_LOCATION}} 00075 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 00076