SECAFloatDocTemplate Class
class SECAFloatDocTemplate: public CMultiDocTemplate
Document template for use with scriptable, dynamically created forms.
Defined in: FloatingDocTemplate.h
Comments
Use this class in conjunction with SECScriptHostDoc, SECScriptHostView, and SECADlgFrame to provide proper support for scriptable frame creation. The following code demonstrates typical usage (place in your CWinApp's InitInstance)
SECAFloatDocTemplate* pFloatDocTempl= new SECAFloatDocTemplate(IDR_TOPLEVEL,// use these resources for loaded/new frames RUNTIME_CLASS(SECScriptHostDoc), RUNTIME_CLASS(SECADlgFrame), RUNTIME_CLASS(SECScriptHostView)); AddDocTemplate(pFloatDocTempl);
In addition, you can also exploit the SECScriptHostDoc::SetFormClass static method to provide a new form class (see SECAFormObj) to receive scriptable dispatch events. For example,
... AddDocTemplate(pFloatDocTempl); SECScriptHostDoc::SetFormClass(RUNTIME_CLASS(CMyCustomFormClass));
See Also
SECScriptHostDoc SECADlgFrame SECScriptHostView
Class Members
SECAFloatDocTemplate(UINT nIDResource, CRuntimeClass* pDocClass,CRuntimeClass* pFrameClass, CRuntimeClass* pViewClass)
Construction
virtual LPDISPATCH GetFormByName(const CString &strFormName)
Fetch the form dispatch matching the particular name.