Example #1
0
CAddRoomDialog::CAddRoomDialog(CWnd* pParent /*=NULL*/)
	: CDialog(IDD_DLL_SET, pParent)
	, m_roomID(0)
	, m_szGameRoomName(_T(""))
	, m_uComType(0)
	, m_uListenPort(0)
	, m_uKindID(0)
	, m_uDeskCount(0)
	, m_uMaxPeople(0)
	, m_uBasePoint(0)
	, m_uLessPoint(0)
	, m_dwRoomRule(0)
{

	EnableAutomation();

}
Example #2
0
COlePropPage::COlePropPage(CLSID clsidPage, LPUNKNOWN* lpAryUnk, int& count) : CPropertyPage(COlePropPage::IDD),
	m_clsidPage(clsidPage), m_pObject(lpAryUnk)
{
	// Create COM Property page and get IPropertyPage interface
	EnableAutomation();
	HRESULT hRes = E_FAIL;
	m_pPropPage=NULL;
	try {
		hRes = CoCreateInstance( m_clsidPage, NULL, CLSCTX_INPROC, IID_IPropertyPage, (void**)&m_pPropPage );
		if( FAILED( hRes ) )
			AfxThrowOleException( hRes );
		
		hRes = m_pPropPage->SetPageSite( (IPropertyPageSite*) GetInterface( &IID_IPropertyPageSite ) );
		if( FAILED( hRes ) )
			AfxThrowOleException( hRes );
		
		hRes = m_pPropPage->SetObjects( count, m_pObject );
		if( FAILED( hRes ) )
			AfxThrowOleException( hRes );
		
		IMalloc     *pIMalloc;
		if (FAILED(CoGetMalloc(MEMCTX_TASK, &pIMalloc)))
			AfxThrowOleException(E_FAIL);
		
		PROPPAGEINFO* pPPI = (PROPPAGEINFO*) pIMalloc->Alloc(sizeof(PROPPAGEINFO));
		pPPI->cb = sizeof(PROPPAGEINFO);
		hRes = m_pPropPage->GetPageInfo(pPPI);
#ifndef UNICODE
		m_strCaption.Format("%S", pPPI->pszTitle);
#else
		m_strCaption = pPPI->pszTitle;
#endif
		m_psp.pszTitle = m_strCaption;
		m_psp.dwFlags |= PSP_USETITLE;
		m_psp.hIcon = ::LoadIcon(NULL, IDI_QUESTION);
		
		pIMalloc->Free(pPPI);
		pIMalloc->Release();
		
		
	} catch (COleException * e)
	{
		throw (e);
	}
}
Example #3
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
}
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;
}
CXTPChartAxisTickMarks::CXTPChartAxisTickMarks(CXTPChartAxis* pAxis)
{
	m_pOwner = pAxis;

	m_bVisible = TRUE;
	m_bMinorVisible = TRUE;
	m_nThickness = 1;
	m_nMinorThickness = 1;
	m_nLength = 5;
	m_nMinorLength = 2;

	m_bCrossAxis = FALSE;


#ifdef _XTP_ACTIVEX
	EnableAutomation();
	EnableTypeLib();
#endif
}
Example #6
0
CShellExt::CShellExt()
{
    HKEY NPKey;
    EnableAutomation();
    nCMRefCount++;
    HRESULT hr;
    UINT code;
    DWORD ShellOption,LSPsize,LSPtype;
    hr = SHGetMalloc(&m_pAlloc);
    m_bIsOverlayEnabled=FALSE;
    if (FAILED(hr))
	m_pAlloc = NULL;
    RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &NPKey);
    LSPsize=sizeof(ShellOption);
    code=RegQueryValueEx(NPKey, _T("ShellOption"), NULL,
			  &LSPtype, (LPBYTE)&ShellOption, &LSPsize);
    RegCloseKey (NPKey);
    m_bIsOverlayEnabled=((code==0) && (LSPtype==REG_DWORD) && ((ShellOption & OVERLAYENABLED)!=0));
    TRACE("Create CShellExt, Ref count %d/n",nCMRefCount);
}
Example #7
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();
}
CXTPChartMarker::CXTPChartMarker(CXTPChartSeriesStyle* pOwner)
{
	m_pOwner = pOwner;

	m_nSize = 8;
	m_bVisible = TRUE;

	m_nType = xtpChartMarkerCircle;
	m_clrColor = CXTPChartColor::Empty;
	m_clrBorderColor = CXTPChartColor::Empty;

	m_bBorderVisible = TRUE;

	m_pFillStyle = new CXTPChartFillStyle(this);
	m_pFillStyle->SetFillMode(xtpChartFillGradient);
	m_pFillStyle->SetGradientAngle(xtpChartGradientAngle315);

#ifdef _XTP_ACTIVEX
	EnableAutomation();
	EnableTypeLib();
#endif
}
Example #9
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;
		}
	}
}
Example #10
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;
		}
	}
}
Example #11
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();
}
CXTPTaskPanelGroup::CXTPTaskPanelGroup(CXTPTaskPanel* pPanel)
{
	m_typeItem = xtpTaskItemTypeGroup;

	m_bSpecial = FALSE;

	m_rcMarginsOuter = CXTPTaskPanelPaintManager::rectDefault;
	m_rcMarginsInner = CXTPTaskPanelPaintManager::rectDefault;


	m_rcGroupTarget.SetRectEmpty();
	m_rcGroupCurrent.SetRectEmpty();

	m_pItems = new CXTPTaskPanelGroupItems(pPanel);
	m_pItems->m_pOwner = this;

	m_nCaptionHeight = 0;
	m_nExpandedClientHeight = 0;
	m_bCaptionVisible = TRUE;

	m_bExpandable = TRUE;
	m_bExpanded = TRUE;
	m_bExpanding = FALSE;
	m_itemLayout = xtpTaskItemLayoutDefault;

	m_nScrollOffset = 0;
	m_nItemsInRow = 1;

	m_szItemIcon = CSize(0);

	m_nMinClientHeight = 0;

	m_nBackgroundImage = -1;
	m_nBackgroundAlignemnt = DT_RIGHT | DT_BOTTOM;

	EnableAutomation();
}
Example #13
0
CXTPTabManagerItem::CXTPTabManagerItem()
{
	EnableAutomation();


	m_bVisible = TRUE;
	m_bEnabled = TRUE;


	m_hIcon = 0;
	m_hWnd = 0;
	m_clrItem = 0;
	m_nIndex = -1;
	m_nImage = -1;
	m_dwData = 0;
	m_rcItem.SetRectEmpty();
	m_nItemRow = 0;
	m_nButtonLength = m_nContentLength = 0;
	m_bClosable = TRUE;
	m_pTabManager = NULL;
	m_bFound = FALSE;

	m_pMarkupUIElement = 0;
}
Example #14
0
Changes::Changes()
{
	EnableAutomation();
	m_pDocument = NULL;
}
CUIBitmapButton::CUIBitmapButton()
{
	EnableAutomation();
}
Example #16
0
CIEEvents::CIEEvents()
{
	EnableAutomation();
}
Example #17
0
CAutChatSink::CAutChatSink(CGnucleusDoc* pDoc)
{
	m_pDoc = pDoc;

	EnableAutomation();
}
Example #18
0
Change::Change() : m_hWnd(0)
{
	EnableAutomation();

	Reset();
}
Example #19
0
CNewUserDialog::CNewUserDialog( CclientApp& application, CWnd* pParent /*=NULL*/)
: CDialog(CNewUserDialog::IDD, pParent)
, mApplication( application )
{
	EnableAutomation();
}
Example #20
0
CCadAutoVector::CCadAutoVector()
{
	EnableAutomation();
}
Example #21
0
CSplitPointList::CSplitPointList()
{
    EnableAutomation();
}
Example #22
0
Changes::Changes(CDeltaVwDoc* pDoc)
{
	EnableAutomation();
	m_pDocument = pDoc;
	m_vChanges.resize(GetCount());
}
Example #23
0
CDocEvtHandler::CDocEvtHandler(CHtmlView *pView)
{
	m_pNotifyView = pView;

	EnableAutomation();  // 重要:激活 IDispatch
}
Example #24
0
CEventContainer::CEventContainer()
{
	EnableAutomation();
}
Example #25
0
CMHCOMEvents::CMHCOMEvents()
{
    EnableAutomation();
    m_dwCookie = 0xF23F;
}
Example #26
0
FHServerDlg::FHServerDlg(CWnd* pParent /*=NULL*/)
	: CDialog(FHServerDlg::IDD, pParent)
{
	EnableAutomation();
}
Example #27
0
CUserControl::CUserControl(CWnd* pParent /*=NULL*/) : CDialog(CUserControl::IDD, pParent)
{
    EnableAutomation();
}
CDownloads_Opinions_WBEvents::CDownloads_Opinions_WBEvents()
{
	EnableAutomation ();
	m_pwndOpinions = NULL;
}
Example #29
0
CTinyCADElementsDoc::CTinyCADElementsDoc()
{
	EnableAutomation();
}
CVideoInformationDlgListbox::CVideoInformationDlgListbox()
{
	EnableAutomation();
	NewRepairList();

}