[GME-commit] GMESRC/GME/Console StdAfx.h,1.1,1.2 StdAfx.cpp,1.1,1.2
Resource.h,1.1,1.2 ConsoleCtl.h,1.1,1.2 ConsoleCtl.cpp,1.1,1.2
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Thu Dec 2 15:59:03 CST 2004
Update of /var/lib/gme/GMESRC/GME/Console
In directory braindrain:/tmp/cvs-serv12431
Modified Files:
StdAfx.h StdAfx.cpp Resource.h ConsoleCtl.h ConsoleCtl.cpp
Log Message:
console scripting
CVS User: bogyom
Index: StdAfx.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Console/StdAfx.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** StdAfx.h 24 Jul 2004 06:41:53 -0000 1.1
--- StdAfx.h 2 Dec 2004 21:58:55 -0000 1.2
***************
*** 29,32 ****
--- 29,39 ----
#include "..\Common\CommonMgaTrukk.h"
+ #define _ATL_APARTMENT_THREADED
+ #include <atlbase.h>
+ //You may derive a class from CComModule and use it if you want to override
+ //something, but do not change the name of _Module
+ extern CComModule _Module;
+ #include <atlcom.h>
+
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
Index: StdAfx.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Console/StdAfx.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** StdAfx.cpp 24 Jul 2004 06:41:53 -0000 1.1
--- StdAfx.cpp 2 Dec 2004 21:58:55 -0000 1.2
***************
*** 4,5 ****
--- 4,10 ----
#include "stdafx.h"
+ #ifdef _ATL_STATIC_REGISTRY
+ #include <statreg.h>
+ #endif
+ #include <atlimpl.cpp>
+
Index: Resource.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Console/Resource.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Resource.h 24 Jul 2004 06:41:53 -0000 1.1
--- Resource.h 2 Dec 2004 21:58:55 -0000 1.2
***************
*** 9,12 ****
--- 9,15 ----
#define IDS_CONSOLE_PPG 2
#define IDD_BROWSER 101
+ #define IDD_EDIT 102
+ #define IDR_CONSOLE 103
+ #define IDR_SCRIPTHOST 104
#define IDS_CONSOLE_PPG_CAPTION 200
#define IDD_PROPPAGE_CONSOLE 200
***************
*** 19,23 ****
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201
! #define _APS_NEXT_SYMED_VALUE 102
#endif
#endif
--- 22,26 ----
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201
! #define _APS_NEXT_SYMED_VALUE 106
#endif
#endif
Index: ConsoleCtl.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Console/ConsoleCtl.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ConsoleCtl.h 24 Jul 2004 06:41:53 -0000 1.1
--- ConsoleCtl.h 2 Dec 2004 21:58:55 -0000 1.2
***************
*** 7,11 ****
#include "HtmlCtrl.h"
!
// ConsoleCtl.h : Declaration of the CConsoleCtrl ActiveX Control class.
--- 7,11 ----
#include "HtmlCtrl.h"
! #include "ScriptEdit.h"
// ConsoleCtl.h : Declaration of the CConsoleCtrl ActiveX Control class.
***************
*** 32,39 ****
// Implementation
! protected:
~CConsoleCtrl();
CHtmlCtrl m_browser;
DECLARE_OLECREATE_EX(CConsoleCtrl) // Class factory and guid
--- 32,40 ----
// Implementation
! // protected:
~CConsoleCtrl();
CHtmlCtrl m_browser;
+ CScriptEdit m_edit;
DECLARE_OLECREATE_EX(CConsoleCtrl) // Class factory and guid
***************
*** 47,51 ****
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
!
// Dispatch maps
//{{AFX_DISPATCH(CConsoleCtrl)
--- 48,52 ----
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
! public:
// Dispatch maps
//{{AFX_DISPATCH(CConsoleCtrl)
***************
*** 57,60 ****
--- 58,62 ----
DECLARE_DISPATCH_MAP()
+ afx_msg void SetGMEApp(IDispatch *disp);
afx_msg void AboutBox();
***************
*** 73,79 ****
dispidMessage = 2L,
dispidClear = 3L,
! eventidClickMGAID = 1L,
//}}AFX_DISP_ID
};
};
--- 75,83 ----
dispidMessage = 2L,
dispidClear = 3L,
! eventidClickMGAID = 1L,
//}}AFX_DISP_ID
};
+
+ private:
};
Index: ConsoleCtl.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Console/ConsoleCtl.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ConsoleCtl.cpp 24 Jul 2004 06:41:53 -0000 1.1
--- ConsoleCtl.cpp 2 Dec 2004 21:58:55 -0000 1.2
***************
*** 43,46 ****
--- 43,47 ----
DISP_DEFVALUE(CConsoleCtrl, "Contents")
//}}AFX_DISPATCH_MAP
+ DISP_FUNCTION(CConsoleCtrl, "SetGMEApp", SetGMEApp, VT_EMPTY, VTS_DISPATCH)
DISP_FUNCTION_ID(CConsoleCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
END_DISPATCH_MAP()
***************
*** 65,69 ****
END_PROPPAGEIDS(CConsoleCtrl)
-
/////////////////////////////////////////////////////////////////////////////
// Initialize class factory and guid
--- 66,69 ----
***************
*** 157,161 ****
{
if (m_browser.GetSafeHwnd()) {
! m_browser.MoveWindow(rcBounds, TRUE);
}
else {
--- 157,167 ----
{
if (m_browser.GetSafeHwnd()) {
! CRect rect = rcBounds;
! rect.bottom -= 20;
! // move input control too
! m_browser.MoveWindow(rect, TRUE);
! CRect erect = rcBounds;
! erect.top = rect.bottom;
! m_edit.MoveWindow(erect, TRUE);
}
else {
***************
*** 186,190 ****
pdc->SetTextAlign(TA_CENTER);
! pdc->TextOut(rcBounds.Width()/2, rcBounds.Height()/2, CString("ObjectInspector ActiveX Control"));
}
}
--- 192,196 ----
pdc->SetTextAlign(TA_CENTER);
! pdc->TextOut(rcBounds.Width()/2, rcBounds.Height()/2, label);
}
}
***************
*** 224,227 ****
--- 230,238 ----
}
+ /////////////////////////////////////////////////////////////////////////////
+ void CConsoleCtrl::SetGMEApp(IDispatch *disp)
+ {
+ m_edit.SetGMEApp(disp);
+ }
/////////////////////////////////////////////////////////////////////////////
***************
*** 234,237 ****
--- 245,249 ----
CRect rect(0,0,0,0);
+ // create an input controll too
m_browser.Create(NULL,
_T("GME Console"),
***************
*** 240,246 ****
this,
IDD_BROWSER);
-
m_browser.LoadFromResource("BLANK.HTML");
return 0;
--- 252,260 ----
this,
IDD_BROWSER);
m_browser.LoadFromResource("BLANK.HTML");
+ m_edit.Create((ES_AUTOHSCROLL | WS_VISIBLE | WS_CHILD), rect, this, IDD_EDIT);
+ m_edit.LimitText(300);
+ bool ret = m_edit.Init(this);
return 0;
More information about the GME-commit
mailing list