Пример #1
0
CBenubirdAutoProxy::CBenubirdAutoProxy()
{
	g_strDBG.Empty();
	g_strDBG.Format(_T("------------------------------------- start AutoProxy  %X"),this);
	OutputDebugString(g_strDBG);


	EnableAutomation();
	
	// To keep the application running as long as an automation 
	//	object is active, the constructor calls AfxOleLockApp.
	AfxOleLockApp();

	// Get access to the dialog through the application's
	//  main window pointer.  Set the proxy's internal pointer
	//  to point to the dialog, and set the dialog's back pointer to
	//  this proxy.
	ASSERT_VALID(AfxGetApp()->m_pMainWnd);
	if (AfxGetApp()->m_pMainWnd)
	{
		ASSERT_KINDOF(CMainFrame, AfxGetApp()->m_pMainWnd);
		if (AfxGetApp()->m_pMainWnd->IsKindOf(RUNTIME_CLASS(CMainFrame)))
		{
			m_pDialog = reinterpret_cast<CMainFrame*>(AfxGetApp()->m_pMainWnd);
			m_pDialog->m_pAutoProxy = this;
		}
	}
}
Пример #2
0
COleDocument::COleDocument()
{
	ASSERT(m_viewList.IsEmpty());
	ASSERT(m_docItemList.IsEmpty());

#ifdef _DEBUG
	// check for common mistake of not initializing OLE libraries before
	//  creating an OLE document.
	LPMALLOC lpMalloc = NULL;
	if (::CoGetMalloc(MEMCTX_TASK, &lpMalloc) != S_OK)
	{
		TRACE(traceOle, 0, "Warning: CoGetMalloc(MEMCTX_TASK, ...) failed --\n");
		TRACE(traceOle, 0, "\tperhaps AfxOleInit() has not been called.\n");
	}
	RELEASE(lpMalloc);
#endif

	m_dwNextItemNumber = 1; // item number for first item in document
	m_bLastVisible = FALSE;

	m_bRemember = TRUE;
	m_bSameAsLoad = TRUE;
	m_lpRootStg = NULL;
	m_ptd = NULL;       // default to screen target device
	m_bCompoundFile = FALSE;

	AfxOleLockApp();
}
Пример #3
0
COpcC_Client::COpcC_Client()
{
   groupHandle = 0;
//   pCurrentItem = NULL;
//   hView = NULL;
   transactionID = 0;
   dwConnection1 = 0;
   dwConnection2 = 0;
   testSink = new COpcC_AdviseSink;   // create the advise sink for notifications
   testSink->AddRef();

   callbackCP = new OPCCallbackObject;   // create the ConnectionPoint for notifications
   callbackCP->AddRef();
   shutdownCP = new OPCShutdownObject;   // create the ConnectionPoint for notifications
   shutdownCP->AddRef();
   dwShutdownConnection = 0;
   usingCP = FALSE;

   AfxOleLockApp();
   //theDoc = this;

//   // Everyone can connect back to IAdviseSink
//   HRESULT hr = CoInitializeSecurity(NULL, -1, NULL, NULL,
//      RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IDENTIFY, NULL, EOAC_NONE, NULL);
//   if (FAILED(hr))
//   {
//      TRACE(_T("CoInitializeSecurity failed, %lx"), hr);
//   }
}
Пример #4
0
CColorEyeIDoc::CColorEyeIDoc()
{
    // TODO: add one-time construction code here

    EnableAutomation();
    AfxOleLockApp();
}
Пример #5
0
CDoc::CDoc()
{
	// TODO: この位置に 1 度だけ呼ばれる構築用のコードを追加してください。

	EnableAutomation();

	AfxOleLockApp();
}
Пример #6
0
CMysnifferDoc::CMysnifferDoc()
{
	// TODO: add one-time construction code here

	EnableAutomation();

	AfxOleLockApp();
}
Пример #7
0
C__TB_DataDoc::C__TB_DataDoc()
{
	// TODO: add one-time construction code here

	EnableAutomation();

	AfxOleLockApp();
}
CSTEditorDoc::CSTEditorDoc ()
//: m_bSpecialWPDisplay (false)
{
    m_bEnableWPChanges = true;
    EnableAutomation ();
    EnableConnections ();
    AfxOleLockApp ();
}
COgreInMfcDoc::COgreInMfcDoc()
{
	// TODO: add one-time construction code here

	EnableAutomation();

	AfxOleLockApp();
}
Пример #10
0
CAutoClickDoc::CAutoClickDoc()
{
	EnableAutomation();
	m_pt = CPoint(10, 10);
	m_str = _T("Automation!");

	AfxOleLockApp();
}
Пример #11
0
CAutoClickPoint::CAutoClickPoint()
{
    EnableAutomation();

    // To keep the application running as long as an OLE automation
    //  object is active, the constructor calls AfxOleLockApp.

    AfxOleLockApp();
}
Пример #12
0
CSkinWndBase::CSkinWndBase()
{
	EnableAutomation();
	
	// 为了使应用程序在 OLE 自动化对象处于活动状态时保持
	//	运行,构造函数调用 AfxOleLockApp。
	
	AfxOleLockApp();
}
Пример #13
0
CReportObj::CReportObj(CDevObjDoc* pContainerDoc) :
	CFormObj(pContainerDoc)
{
	EnableAutomation();
	
	m_strClassName = "Report";
	
	AfxOleLockApp();
}
Пример #14
0
CDispSimple::CDispSimple()
{
	EnableAutomation();
	
	// 为了使应用程序在 OLE 自动化对象处于活动状态时保持
	//	运行,构造函数调用 AfxOleLockApp。
	
	AfxOleLockApp();
}
Пример #15
0
//
// Ctor
//
CKaiDoc::CKaiDoc()
{
    EnableAutomation();
    AfxOleLockApp();

    pco_Doc_ = new CT_DocDescriptor;

//    v_Null();
}
Пример #16
0
CText::CText()
{
	EnableAutomation();
	
	// To keep the application running as long as an OLE automation 
	//	object is active, the constructor calls AfxOleLockApp.
	
	AfxOleLockApp();
	m_pchText = NULL;
}
CABMOfficeSystemcppDoc::CABMOfficeSystemcppDoc()
{
	// Use OLE compound files
	EnableCompoundFile();

	// TODO: add one-time construction code here

	EnableAutomation();

	AfxOleLockApp();
}
Пример #18
0
CSpaceship::CSpaceship()
{
    TRACE("CSpaceship ctor\n");
    m_nPosition = 100;
    m_nAcceleration = 101;
    m_nColor = 102;
    // To keep the application running as long as an OLE automation
    //   object is active, the constructor calls AfxOleLockApp.
    
    AfxOleLockApp();
}
Пример #19
0
CDevObjDoc::CDevObjDoc()
{
	m_dwVer = 0;
	m_dwNextObjectNumber = 0;
	m_bObjectsIsDeleting = FALSE;

	EnableCompoundFile();
	EnableAutomation();

	AfxOleLockApp();
}
Пример #20
0
CEditFeatureParamDlg::CEditFeatureParamDlg() 
	: COlePropertyPage(CEditFeatureParamDlg::IDD, IDS_TITLE_EDITFEATUREPARAMDLG)
{
	//{{AFX_DATA_INIT(CEditFeatureParamDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT

#if defined(_DEBUG)
	m_bNonStandardSize = TRUE;
#endif	// _DEBUG

// To keep the application running as long as an OLE automation 
// object is active, the constructor calls AfxOleLockApp.   
	AfxOleLockApp(); 
}
CMFC_ControlsDlgAutoProxy::CMFC_ControlsDlgAutoProxy()
{
	EnableAutomation();
	
	// To keep the application running as long as an automation 
	//	object is active, the constructor calls AfxOleLockApp.
	AfxOleLockApp();

	// Get access to the dialog through the application's
	//  main window pointer.  Set the proxy's internal pointer
	//  to point to the dialog, and set the dialog's back pointer to
	//  this proxy.
	ASSERT (AfxGetApp()->m_pMainWnd != NULL);
	ASSERT_VALID (AfxGetApp()->m_pMainWnd);
	ASSERT_KINDOF(CMFC_ControlsDlg, AfxGetApp()->m_pMainWnd);
	m_pDialog = (CMFC_ControlsDlg*) AfxGetApp()->m_pMainWnd;
	m_pDialog->m_pAutoProxy = this;
}
Пример #22
0
CComponentObj::CComponentObj()
{
	EnableAutomation();

	// To keep the application running as long as an OLE automation
	//	object is active, the constructor calls AfxOleLockApp.

	AfxOleLockApp();

	registeractiveobjectret = 0;
	interactive = true;
#ifdef RAWCOMPONENT_H
	rawcomp.interactive = interactive;
#endif // RAWCOMPONENT_H
#ifdef BUILDER_OBJECT_NETWORK_V2
	bon2Comp.m_bIsInteractive = interactive;
#endif // BUILDER_OBJECT_NETWORK_V2
}
Пример #23
0
CSkinItemSlider::CSkinItemSlider()
{
	EnableAutomation();
	
	// 为了使应用程序在 OLE 自动化对象处于活动状态时保持
	//	运行,构造函数调用 AfxOleLockApp。

	m_bTransparent = TRUE;
	
	m_pChannelImage = NULL;
	m_pThumbNormalImage = NULL;
	m_pThumbClickImage = NULL;
    m_pFullImage = NULL;
	m_lBarHeight = 5;
	m_lFullBegin = 0;

    m_bInThumbOrDrag = FALSE;
	m_bVeritySlider = FALSE;

	AfxOleLockApp();
}
Пример #24
0
CNumberDlgAutoProxy::CNumberDlgAutoProxy()
{
	EnableAutomation();
	
	// To keep the application running as long as an automation 
	//	object is active, the constructor calls AfxOleLockApp.
	AfxOleLockApp();

	// Get access to the dialog through the application's
	//  main window pointer.  Set the proxy's internal pointer
	//  to point to the dialog, and set the dialog's back pointer to
	//  this proxy.
	ASSERT_VALID(AfxGetApp()->m_pMainWnd);
	if (AfxGetApp()->m_pMainWnd)
	{
		ASSERT_KINDOF(CNumberDlg, AfxGetApp()->m_pMainWnd);
		if (AfxGetApp()->m_pMainWnd->IsKindOf(RUNTIME_CLASS(CNumberDlg)))
		{
			m_pDialog = reinterpret_cast<CNumberDlg*>(AfxGetApp()->m_pMainWnd);
			m_pDialog->m_pAutoProxy = this;
		}
	}
}
Пример #25
0
CEVDetectionDlgAutoProxy::CEVDetectionDlgAutoProxy()
{
	EnableAutomation();
	
	// 为使应用程序在自动化对象处于活动状态时一直保持 
	//	运行,构造函数调用 AfxOleLockApp。
	AfxOleLockApp();

	// 通过应用程序的主窗口指针
	//  来访问对话框。设置代理的内部指针
	//  指向对话框,并设置对话框的后向指针指向
	//  该代理。
	ASSERT_VALID(AfxGetApp()->m_pMainWnd);
	if (AfxGetApp()->m_pMainWnd)
	{
		ASSERT_KINDOF(CEVDetectionDlg, AfxGetApp()->m_pMainWnd);
		if (AfxGetApp()->m_pMainWnd->IsKindOf(RUNTIME_CLASS(CEVDetectionDlg)))
		{
			m_pDialog = reinterpret_cast<CEVDetectionDlg*>(AfxGetApp()->m_pMainWnd);
			m_pDialog->m_pAutoProxy = this;
		}
	}
}
Пример #26
0
COleServerItem::COleServerItem(COleServerDoc* pServerDoc, BOOL bAutoDelete)
{
	if (pServerDoc != NULL)
		ASSERT_VALID(pServerDoc);

	m_dwRef = 0;    // always start in disconnected state
	m_bAutoDelete = bAutoDelete;
	m_bNeedUnlock = FALSE;

	// initially, item does not have an extent
	m_sizeExtent.cx = 0;
	m_sizeExtent.cy = 0;

	// initialize advise holders
	m_lpOleAdviseHolder = NULL;
	m_lpDataAdviseHolder = NULL;

	// add presentation formats to the data source
	m_dataSource.m_nGrowBy = 1;
	FORMATETC formatEtc;
	formatEtc.ptd = NULL;
	formatEtc.dwAspect = DVASPECT_CONTENT;
	formatEtc.lindex = -1;

	// by default, a COleServerItem supports CF_METAFILEPICT
	formatEtc.cfFormat = CF_METAFILEPICT;
	formatEtc.tymed = TYMED_MFPICT;
	m_dataSource.DelayRenderData(0, &formatEtc);

	// add item to server document
	m_pDocument = NULL;
	if (pServerDoc != NULL)
		pServerDoc->AddItem(this);
	ASSERT(m_pDocument == pServerDoc);

	AfxOleLockApp();
}
Пример #27
0
CSkinItemEdit::CSkinItemEdit()
{
	EnableAutomation();
	
	// 为了使应用程序在 OLE 自动化对象处于活动状态时保持
	//	运行,构造函数调用 AfxOleLockApp。
	m_bSystemEdit = TRUE;

	m_bHasBorder = TRUE;
	m_bThickBorder = FALSE;
    m_bOuterBorder = FALSE;
    m_bInnerBorder = FALSE;

	m_clrBorderColorNormal = RGB(165, 189, 223);//RGB(128, 128, 128);//RGB(143, 172, 219);
	m_clrBorderColorHover = RGB(165, 189, 223);//m_clrBorderColorNormal;
	m_clrBorderColorFocus = RGB(165, 189, 223);//m_clrBorderColorNormal;//RGB(0x61, 0x8E, 0xDA);
	m_clrBorderColorReadOnly = RGB(165, 189, 223);//m_clrBorderColorNormal;//RGB(0x61, 0x8E, 0xDA);
    m_clrBorderColorDisabled = RGB(128, 128, 128);
    m_clrOuterBorderColorNormal = m_clrBorderColorNormal;
    m_clrOuterBorderColorHover = m_clrBorderColorHover;
    m_clrOuterBorderColorFocus = m_clrBorderColorFocus;
    m_clrOuterBorderColorReadOnly = m_clrBorderColorReadOnly;
    m_clrOuterBorderColorDisabled = m_clrBorderColorDisabled;
    m_clrInnerBorderColorNormal = m_clrBorderColorNormal;
    m_clrInnerBorderColorHover = m_clrBorderColorHover;
    m_clrInnerBorderColorFocus = m_clrBorderColorFocus;
    m_clrInnerBorderColorReadOnly = m_clrBorderColorReadOnly;
    m_clrInnerBorderColorDisabled = m_clrBorderColorDisabled;

    m_clrBkColorReadOnly = RGB(233, 233, 233);
    m_clrTextColorReadOnly = -1;

    m_bFocusBorder = TRUE;
    m_bReadOnlyBorder = TRUE;

	AfxOleLockApp();
}
Пример #28
0
CMUSHclientDoc::CMUSHclientDoc()
  :	m_eventScriptFileChanged(FALSE, TRUE)

{    // constructor

int i;

  // each document will have a unique number
  m_iUniqueDocumentNumber = App.GetUniqueNumber ();

  m_whenWorldStarted = CTime::GetCurrentTime();
  QueryPerformanceCounter (&m_whenWorldStartedHighPrecision);

  AllocateConfigurationArrays ();

  m_bTrace = false;   // not tracing yet

// note - these initialisations merely make the hash lookup more efficient.
// until v 3.21 they were the default of 20, so this should help somewhat
// The number should be a prime number, hence the strange figures.

  m_VariableMap.InitHashTable (997); // allow for 1000 variables (at least)
  m_AliasMap.InitHashTable (293);    // probably won't have many more than 300 aliases
  m_TriggerMap.InitHashTable (293);  // probably won't have many more than 300 triggers
  m_TimerMap.InitHashTable (293);    // probably won't have many more than 300 timers

  SetDefaults (false);        // set up numeric/boolean defaults
  SetAlphaDefaults (false);   // set up alpha defaults

  m_strWorldID = GetUniqueID ();      // default world ID

  m_CurrentPlugin = NULL;     // no plugin active right now

  m_iBackgroundMode = 0;
  m_iForegroundMode = 0;
  m_iBackgroundColour = NO_COLOUR;

  m_TextRectangle = CRect (0, 0, 0, 0);
  m_TextRectangleBorderOffset = 0;           
  m_TextRectangleBorderColour = 0;           
  m_TextRectangleBorderWidth = 0;            
  m_TextRectangleOutsideFillColour = 0;      
  m_TextRectangleOutsideFillStyle = 0;   

  m_iCurrentActionSource = eUnknownActionSource;
  m_nBytesIn = 0;
  m_nBytesOut = 0;
  m_bTabCompleteFunctions = true;

  m_iTriggersEvaluatedCount = 0; 
  m_iTriggersMatchedCount = 0;   
  m_iAliasesEvaluatedCount = 0;  
  m_iAliasesMatchedCount = 0;    
  m_iTimersFiredCount = 0;       
  m_iTriggersMatchedThisSessionCount = 0;   
  m_iAliasesMatchedThisSessionCount = 0;    
  m_iTimersFiredThisSessionCount = 0;       

  m_bLoaded = false;
  m_bMapping = false;
  m_bRemoveMapReverses = true;
  m_MapFailureRegexp = NULL;
  m_bPluginProcessingCommand = false;
  m_bPluginProcessingSend = false;
  m_bPluginProcessingSent = false;
  m_iLastCommandCount = 0;
  m_iExecutionDepth = 0;
  m_iNextChatID = 0;
  m_tLastMessageTime = 0;
  m_tLastGroupMessageTime = 0;
  m_bOmitFromCommandHistory = false;
  m_bUTF_8 = false;
  m_bWorldClosing = false;
  m_bInSendToScript = true;

  m_bInPlaySoundFilePlugin = false;
  m_bInCancelSoundFilePlugin = false;

  m_strStatusMessage = Translate ("Ready");
  m_bShowingMapperStatus = false;
  m_iMCCP_type = 0;
  m_bSupports_MCCP_2 = false;
  m_bNoEcho = false;
  m_bDebugIncomingPackets = false;
  m_iInputPacketCount = 0;
  m_iOutputPacketCount = 0;
  m_iUTF8ErrorCount = 0;
  m_lastGoTo = 1;
  m_bNAWS_wanted = false;
  m_bCHARSET_wanted = false;
  m_bSuppressNewline = false;
  m_echo_colour = SAMECOLOUR;
  m_bAlwaysRecordCommandHistory = false;
  m_bDoNotShowOutstandingLines = false;
  m_bDoNotTranslateIACtoIACIAC = false;
  m_bAutoResizeCommandWindow = false;
  m_bLogScriptErrors = false;
  m_bOmitSavedDateFromSaveFiles = false;
  m_iAutoResizeMinimumLines = 1;   
  m_iAutoResizeMaximumLines = 20;   
  m_bDoNotAddMacrosToCommandHistory = false;
  m_bCopySelectionToClipboard = false;
  m_bCarriageReturnClearsLine = false;
  m_bConvertGAtoNewline = false;
  m_bSendMXP_AFK_Response = true;
  m_bMudCanChangeOptions = true;
//  m_bShowGridLinesInListViews = true;  // NB - app-wide :P
  m_bEnableSpamPrevention = false;
  m_strSpamMessage = "look";
  m_iSpamLineCount = 20;
  m_iLastOutgoingChatPort = DEFAULT_CHAT_PORT;
  m_bScrollBarWanted = TRUE;

  m_iSocksProcessing = 0;   // no socks processing wanted
  m_iProxyServerPort = 1080; // default socks port

  // deprecated options  - set to zero for saving comparison (for XML testing)

  m_page_colour = 0;
  m_whisper_colour= 0;
  m_mail_colour = 0;
  m_game_colour = 0;
  m_chat_colour = 0;
  m_remove_channels1 = 0;
  m_remove_channels2 = 0;
  m_remove_pages= 0;
  m_remove_whispers = 0;
  m_remove_set= 0;
  m_remove_mail = 0;
  m_remove_game = 0;

  // things I found to be not initialised in version 3.43

  m_timestamps = 0;
  m_iFlags1 = 0;
  m_iFlags2 = 0;
  m_iListMode = 0;
  m_iListCount = 0;
  m_iMXP_previousMode = eMXP_open;
  m_code = 0;

  // sound buffers
  for (i = 0; i < MAX_SOUND_BUFFERS; i++)
    m_pDirectSoundSecondaryBuffer [i] = NULL;

  /*---------------------------------------------------------
  I want to be able to time speed walking delays (for pulling things
  out of the list, so I need a window that can take timer events, however
  a CDocument isn't a window. Thus, I'll make a hidden window for this
  specific purpose.

  I previously had speed walking tied to the CSendView window but this was
  pretty crappy, because you could have multiple send views, thus the timers
  would be all over the shop, and it was very fiddly when firing a "send" from
  a trigger, because a trigger is not related to a particular send view.

  --------------------------------------------------------- */


  // create window that we can use for firing timers
  m_pTimerWnd = new CTimerWnd (this);

	m_pTimerWnd->m_hWnd = NULL;
	if (!m_pTimerWnd->CreateEx(0, AfxRegisterWndClass(0),
		_T("Document timer window"),
		WS_OVERLAPPED, 0, 0, 0, 0, NULL, NULL))
	  {
		TRACE0("Warning: unable to create document timer window!\n");
		AfxThrowResourceException();
  	}
	ASSERT(m_pTimerWnd->m_hWnd != NULL);
	ASSERT(CWnd::FromHandlePermanent(m_pTimerWnd->m_hWnd) == m_pTimerWnd);


  for (i = 0; i < 8; i++)  
    m_font [i] = NULL;
  m_input_font = NULL;
  m_FontHeight = 0;
  m_FontWidth = 0;
  m_InputFontHeight = 0;
  m_InputFontWidth = 0;
  m_total_lines = 0;
  m_newlines_received = 0;
  m_last_line_with_IAC_GA = 0;
  m_nTotalLinesSent = 0;
  m_nTotalLinesReceived = 0;
  m_phase = NONE;
  m_ttype_sequence = 0;

  m_bVariablesChanged = false;

  m_view_number = 0;
  m_LastFlushTime = CTime::GetCurrentTime();

  m_bCompress = false;    // no compression yet
  m_bCompressInitOK = false;
  m_CompressInput = NULL;
  m_CompressOutput = NULL;

  // initialise zlib decompression 

  m_zCompress.next_in = Z_NULL; 
  m_zCompress.avail_in = 0; 
  m_zCompress.zalloc = Z_NULL; 
  m_zCompress.zfree = Z_NULL; 
  m_zCompress.opaque = Z_NULL; 
  m_nTotalUncompressed = 0;
  m_nTotalCompressed = 0;
  m_iCompressionTimeTaken = 0;
  m_nCompressionOutputBufferSize = COMPRESS_BUFFER_LENGTH;  // initial value

  // we will defer initialising zlib until we really have to

	m_pSocket = NULL;
  m_pChatListenSocket = NULL;    // no listening socket
  m_logfile = NULL;
  m_match_width = 30;

  m_bSelected = true;

  m_bNotesInRGB = false;    // notes are in palette colour right now
  m_iNoteStyle = NORMAL;    // notes are not bold right now

// MXP

  m_bMXP = false;   // no MXP yet
  m_bPuebloActive = false; // no Pueblo yet either <evil grin>
  m_bInParagraph = false;
  m_bMXP_script = false;
  m_bPreMode = false;
  m_iMXP_defaultMode = eMXP_open;
  m_iMXP_mode = m_iMXP_defaultMode;
  m_cLastChar = 0;

  // initial styles

  m_iFlags = 0;
  m_iForeColour = WHITE;
  m_iBackColour = BLACK;

  if (m_bCustom16isDefaultColour)
    {
    m_iForeColour = 15;   // use custom colour 16
    m_iBackColour = 15;
    m_iFlags |= COLOUR_CUSTOM;
    }

//  m_normalcolour [BLACK]    = RGB (192, 192, 192) | PALETTE;    // black   
//  m_normalcolour [RED]      = RGB (128,   0,  64) | PALETTE;    // red     
//  m_normalcolour [GREEN]    = RGB (128, 255, 128) | PALETTE;    // green   
//  m_normalcolour [YELLOW]   = RGB (255, 255, 128) | PALETTE;    // yellow  
//  m_normalcolour [BLUE]     = RGB (  0, 255, 255) | PALETTE;    // blue    
//  m_normalcolour [MAGENTA]  = RGB (255,   0, 128) | PALETTE;    // magenta 
//  m_normalcolour [CYAN]     = RGB (128, 255, 255) | PALETTE;    // cyan    
//  m_normalcolour [WHITE]    = RGB (  0, 128,   0) | PALETTE;    // white   

//  m_boldcolour [BLACK]      = RGB (  0,   0,   0) |  PALETTE;    // black   
//  m_boldcolour [RED]        = RGB (255,   0,   0) |  PALETTE;    // red     
//  m_boldcolour [GREEN]      = RGB (  0, 255,   0) |  PALETTE;    // green   
//  m_boldcolour [YELLOW]     = RGB (255, 255,   0) |  PALETTE;    // yellow  
//  m_boldcolour [BLUE]       = RGB (  0,  64, 128) |  PALETTE;    // blue    
//  m_boldcolour [MAGENTA]    = RGB (255,   0, 255) |  PALETTE;    // magenta 
//  m_boldcolour [CYAN]       = RGB (  0, 255, 255) |  PALETTE;    // cyan    
//  m_boldcolour [WHITE]      = RGB (255, 255, 255) |  PALETTE;    // white   

  // better use ANSI colours as the default

  SetDefaultAnsiColours (m_normalcolour, m_boldcolour);

  // and some nice custom colours
  SetDefaultCustomColours (m_customtext, m_customback);

  // default custom colour names
  for (i = 0; i < NUMITEMS (m_strCustomColourName); i++)
    m_strCustomColourName [i].Format ("Custom%i", i + 1);

  for (i = 0; i < NUMITEMS (m_macro_type); i++)
    m_macro_type [i] = SEND_NOW;

// printer styles for printing from the screen

  for (i = 0; i < 8; i++)
    {
     m_nNormalPrintStyle [i] = 0;
     m_nBoldPrintStyle [i] = FONT_BOLD;
    }

  m_bUseDefaultOutputFont = !App.m_strDefaultOutputFont.IsEmpty (); 

  m_bUseDefaultColours   = !App.m_strDefaultColoursFile.IsEmpty ();   
  m_bUseDefaultTriggers  = !App.m_strDefaultTriggersFile.IsEmpty ();   
  m_bUseDefaultAliases   = !App.m_strDefaultAliasesFile.IsEmpty ();    
  m_bUseDefaultMacros    = !App.m_strDefaultMacrosFile.IsEmpty ();     
  m_bUseDefaultTimers    = !App.m_strDefaultTimersFile.IsEmpty ();     
  m_bUseDefaultInputFont = !App.m_strDefaultInputFont.IsEmpty ();  
  
  setupstrings ();

  m_tStatusTime = CTime::GetCurrentTime(); 
  m_tConnectTime = CTime::GetCurrentTime();
  m_tLastPlayerInput = CTime::GetCurrentTime();
  m_timeScriptFileMod = 0;

  m_tsConnectDuration = CTimeSpan (0, 0, 0, 0);

  m_iConnectPhase = eConnectNotConnected;
                                      
  gdoccount++;

  m_pActiveCommandView = NULL;
  m_pActiveOutputView = NULL;

  m_new_lines = 0;

  m_last_prefs_page = 1;

  App.m_bUpdateActivity = TRUE;

// for looking up host names

  ZeroMemory (&m_sockAddr, sizeof m_sockAddr);
  ZeroMemory (&m_ProxyAddr, sizeof m_ProxyAddr);
  m_hNameLookup = NULL;
  m_pGetHostStruct = NULL;
  m_pLinePositions = NULL;

  m_pCurrentLine = NULL;
  m_total_lines = 0;

  // set up the dialog box headings for the finding dialogs
  m_DisplayFindInfo.m_strTitle    = "Find in output buffer...";
  m_MacrosFindInfo.m_strTitle     = "Find macro...";
  m_AliasesFindInfo.m_strTitle    = "Find alias...";
  m_TriggersFindInfo.m_strTitle   = "Find trigger...";
  m_TimersFindInfo.m_strTitle     = "Find timer...";
  m_VariablesFindInfo.m_strTitle  = "Find variable...";
  m_NotesFindInfo.m_strTitle  = "Find in notes...";
  m_RecallFindInfo.m_strTitle    = "Recall...";
          
  m_bRecallCommands = true;
  m_bRecallOutput = true;
  m_bRecallNotes = true;

  // set up column counts for use in the loading and saving of the column orders etc.
  m_MacrosFindInfo.m_iControlColumns    = CPrefsP6::eColumnCount;
  m_AliasesFindInfo.m_iControlColumns   = CPrefsP7::eColumnCount;
  m_TriggersFindInfo.m_iControlColumns  = CPrefsP8::eColumnCount;
  m_TimersFindInfo.m_iControlColumns    = CPrefsP16::eColumnCount;
  m_VariablesFindInfo.m_iControlColumns = CPrefsP18::eColumnCount;

  m_bDisconnectOK = true;    // so we don't try to reconnect to prematurely
  
  m_iMXPerrors = 0;     
  m_iMXPtags = 0;       
  m_iMXPentities = 0;   

  // scripting support

	EnableAutomation();     // not needed?

  if (!bWine)
  	AfxOleLockApp();        // not needed?

  m_ScriptEngine = NULL;

  m_bInScriptFileChanged = false;
  m_pThread = NULL;
  m_bSyntaxErrorOnly = false;

  m_dispidWorldOpen = DISPID_UNKNOWN;
  m_dispidWorldClose = DISPID_UNKNOWN;
  m_dispidWorldSave = DISPID_UNKNOWN;
  m_dispidWorldConnect = DISPID_UNKNOWN;
  m_dispidWorldDisconnect = DISPID_UNKNOWN;
  m_dispidWorldGetFocus = DISPID_UNKNOWN;
  m_dispidWorldLoseFocus = DISPID_UNKNOWN;
  m_dispidOnMXP_Start = DISPID_UNKNOWN;        
  m_dispidOnMXP_Stop = DISPID_UNKNOWN;         
  m_dispidOnMXP_OpenTag = DISPID_UNKNOWN;      
  m_dispidOnMXP_CloseTag = DISPID_UNKNOWN;     
  m_dispidOnMXP_SetVariable = DISPID_UNKNOWN;  
  m_dispidOnMXP_Error = DISPID_UNKNOWN;    

  m_iScriptTimeTaken = 0;   // time taken on scripts

  m_bPluginProcessesOpenTag = false;    
  m_bPluginProcessesCloseTag = false;   
  m_bPluginProcessesSetVariable = false;
  m_bPluginProcessesSetEntity = false;
  m_bPluginProcessesError = false;      

  ZeroMemory (&m_bClient_sent_IAC_DO,   sizeof m_bClient_sent_IAC_DO);
  ZeroMemory (&m_bClient_sent_IAC_DONT, sizeof m_bClient_sent_IAC_DONT);
  ZeroMemory (&m_bClient_sent_IAC_WILL, sizeof m_bClient_sent_IAC_WILL);
  ZeroMemory (&m_bClient_sent_IAC_WONT, sizeof m_bClient_sent_IAC_WONT);

  ZeroMemory (&m_bClient_got_IAC_DO,   sizeof m_bClient_got_IAC_DO);
  ZeroMemory (&m_bClient_got_IAC_DONT, sizeof m_bClient_got_IAC_DONT);
  ZeroMemory (&m_bClient_got_IAC_WILL, sizeof m_bClient_got_IAC_WILL);
  ZeroMemory (&m_bClient_got_IAC_WONT, sizeof m_bClient_got_IAC_WONT);

  m_nCount_IAC_DO = 0;      
  m_nCount_IAC_DONT = 0;    
  m_nCount_IAC_WILL = 0;    
  m_nCount_IAC_WONT = 0;    
  m_nCount_IAC_SB = 0;      

  m_iOutputWindowRedrawCount = 0;

  m_bTreeviewTriggers = true;      
  m_bTreeviewAliases = true;       
  m_bTreeviewTimers = true;        

  // set up some default triggers for MUSHes

  /*
  The parameter are:

  Trigger Name
  Match Text 
  Response Text 
  Flags 
  Colour 
  Wildcard to copy to clipboard
  Sound File Name 
  Script Name
  */

  /*  No, don't. It just confuses Diku MUD people

  AddTrigger ("Game_messages", "GAME:*", "", eEnabled, 0, 0, "", ""); 
  AddTrigger ("Page_poses", "From afar,*", "", eEnabled, 1, 0, "", ""); 
  AddTrigger ("Pages", "^\\w+ pages.*$", "", eEnabled | eTriggerRegularExpression, 1, 0, "", ""); 
  AddTrigger ("Whisper_poses", "You sense:*", "", eEnabled, 2, 0, "", ""); 
  AddTrigger ("Whispers", "^\\w+ whispers.*$", "", eEnabled | eTriggerRegularExpression, 2, 0, "", ""); 
  AddTrigger ("Mail_messages", "MAIL:*", "", eEnabled, 3, 0, "", ""); 
  AddTrigger ("Chat_channel_1", "^\\<.+?\\>.*$", "", eEnabled | eTriggerRegularExpression, 4, 0, "", ""); 
  AddTrigger ("Chat_channel_2", "^\\[.+?\\].*$", "", eEnabled | eTriggerRegularExpression, 4, 0, "", ""); 
  */

  m_nextAcceleratorCommand = ACCELERATOR_FIRST_COMMAND;
  m_accelerator = NULL;

}  // end of CMUSHclientDoc::CMUSHclientDoc()
Пример #29
0
LONG CUPlayBackModule::Lock()
{
    AfxOleLockApp();
    return 1;
}
Пример #30
0
LONG CDistributedGameTreeServerModule::Lock()
{
	AfxOleLockApp();
	return 1;
}