当前位置: 首页>>代码示例>>C++>>正文


C++ AfxGetStaticModuleState函数代码示例

本文整理汇总了C++中AfxGetStaticModuleState函数的典型用法代码示例。如果您正苦于以下问题:C++ AfxGetStaticModuleState函数的具体用法?C++ AfxGetStaticModuleState怎么用?C++ AfxGetStaticModuleState使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了AfxGetStaticModuleState函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AFX_MANAGE_STATE

/**
 * Function name    CDialogGenBase::GetAlias
 * Description      returns the alias for the st object
 * @return          CString
 * @exception       -
 * @see             -
*/
CString CDialogGenBase::GetAlias()
{
    AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
	return m_ObjPropGenBase.m_Alias;
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:12,代码来源:DialogGenBase.cpp

示例2: DllCanUnloadNow

STDAPI DllCanUnloadNow(void)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	return (AfxDllCanUnloadNow()==S_OK && _Module.GetLockCount()==0) ? S_OK : S_FALSE;
}
开发者ID:opensim4opencog,项目名称:PrologVirtualWorlds,代码行数:5,代码来源:vwgeomar.cpp

示例3: AFX_MANAGE_STATE

/**
 * Function name    SysComment::GetRange
 * Description      returns the range of the system comment
 * @return          const StringPosRange&
 * @exception       -
 * @see             -
*/
const StringPosRange& SysComment::GetRange() const
{
    AFX_MANAGE_STATE(AfxGetStaticModuleState( ));

    return m_range;
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:13,代码来源:SysComment.cpp

示例4: DesertFinitNoGui

DLL_DECL void *
DesertFinitNoGui(bool noError,bool noGui,const char *applyConstraints)
{
  AFX_MANAGE_STATE(AfxGetStaticModuleState());
  ASSERT_EX( CManager::theInstance, "CoreInit", "CManager::theInstance IS null");
 
  CCSetErrDialog cse_dialog;

  if(!CManager::theInstance->VerifyConstraints(&cse_dialog))
  {
	  delete CManager::theInstance;
	  CManager::theInstance = NULL;
	  throw new CDesertException(cse_dialog.m_strErrCts);
  }

  CManager::theInstance->AnalyseConstraints();
  CManager::theInstance->GenerateNextHierarchy();
  
  void * retval = NULL;
  if (noError)
  {
    if (CManager::theInstance->HasConstraints())
    {
		if (applyConstraints)
		{
			CStringList cNames;
			bool applyAll = strncmp(applyConstraints, "applyAll", 8) == 0;
			if (!applyAll)
			{
				char *cons = strdup(applyConstraints);
				char *cName = strtok( cons, ":" );
				while(cName)
				{
					cNames.AddTail( cName );
					cName = strtok( NULL, ":" );
				}
			}
			CDynConstraintSet *set = new CDynConstraintSet(0);
			set->RemoveAll();
			CDynConstraintSetList & setlist = CManager::theInstance->GetConstraintSets();

			POSITION sl_pos = setlist.GetHeadPosition();
			while (sl_pos)
			{
				CDynConstraintSet * setlist_i = setlist.GetNext(sl_pos);
				CDynConstraintList& list = setlist_i->GetConstraints();
				POSITION pos1 = list.GetHeadPosition();
				while(pos1)
				{
					CDynConstraint *cur = list.GetNext(pos1);
					const CString& nm  = cur->GetName();

					if (applyAll || cNames.Find(nm))
					{
						Info("DesertFinit", "Applying Constraint: %s", nm);
						cur->SetApplied();
						set->InsertConstraint(cur);
					}
				}
			}
			// prune & generate next hierarchy
			double dspSize;
			long repSize;
			long clockTime;
			try{
				CManager::theInstance->GetSizeInfo(dspSize, repSize, clockTime, set);			
			}catch(CDesertException *e)
			{
				CManager::theInstance->GenerateNextHierarchy();
				set->RemoveAll();
				delete set;
				delete CManager::theInstance;
				CManager::theInstance = NULL;
				StopLogging();
				throw e;
			}
			CManager::theInstance->GenerateNextHierarchy();
			Info("DesertFinit", "Design Space Size Info: %f %d %d", dspSize, repSize, clockTime);
			set->RemoveAll();
			delete set;
		}
    }
//	CManager::theInstance->
//#ifdef DO_STORE_CONFIGURATIONS
    // dump the configurations
    CString fname = projectName + ".cfg";
	std::string errmsg;
	try{
		retval = CManager::theInstance->StoreConfigurations(fname, errmsg);
	 }
	catch(CDesertException *e)
	{
		delete CManager::theInstance;
		CManager::theInstance = NULL;
		StopLogging();
		throw e;
	}
//#endif
  }

//.........这里部分代码省略.........
开发者ID:pombredanne,项目名称:metamorphosys-desktop,代码行数:101,代码来源:desert.cpp

示例5: DllGetClassObject

STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	return AfxDllGetClassObject(rclsid, riid, ppv);
}
开发者ID:NickSerg,项目名称:PDFLibNet,代码行数:5,代码来源:AFPDFLib.cpp

示例6: AFX_MANAGE_STATE

HRESULT CCommands::XApplicationEvents::DocumentSave (IDispatch * theDocument)
{
	AFX_MANAGE_STATE (AfxGetStaticModuleState ());
	return S_OK;
}
开发者ID:coliveira,项目名称:vim,代码行数:5,代码来源:Commands.cpp

示例7: AFX_MANAGE_STATE

CMarkReaderWriter::CMarkReaderWriter()
{
   AFX_MANAGE_STATE(AfxGetStaticModuleState());

   m_aAllMarks.SetSize(0, 160);
}
开发者ID:identity0815,项目名称:os45,代码行数:6,代码来源:MarkReaderWriter.cpp

示例8: AFX_MANAGE_STATE

/**
 * Function name    Resource::getTarget
 * Description      returns the target for the resource
 * @return          const string&
 * @exception       -
 * @see             -
*/
const string& Resource::getTarget() const
{
    AFX_MANAGE_STATE(AfxGetStaticModuleState( ));

    return m_target;
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:13,代码来源:StResource.cpp

示例9: StartEnliver

BOOL WINAPI StartEnliver()
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	return StartEnliverRaw(TRUE);
}
开发者ID:calupator,项目名称:wiredplane-wintools,代码行数:5,代码来源:IEnliver.cpp

示例10: AFX_MANAGE_STATE

STDMETHODIMP CPointClass::get_LastErrorCode(long *pVal)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())
	*pVal = tkNO_ERROR;
	return S_OK;
}
开发者ID:liuzhumei,项目名称:MapWinGIS,代码行数:6,代码来源:PointClass.cpp

示例11: AFX_MANAGE_STATE

BOOL CPolyTool::OnLButtonDown(  UINT nFlags, POINT ptScreen )
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState( ));	

 	HRESULT hr = S_OK;
	BOOL bHandled = FALSE;
	VARIANT_BOOL bSafe = VARIANT_TRUE;
	HWND hWnd;
	VARIANTARG varHitParams,varHitResult;
	BOOL bMakeNewBoundary = TRUE;
	D3DVECTOR vec;

	::VariantInit( &varHitParams );
	::VariantInit( &varHitResult );

	float flX = (float)ptScreen.x;
	float flY = (float)ptScreen.y;
	float flZ = 0.0;

	if(!m_pUIView || !m_pControlManager)
	{
		hr = VWSTUDIO_E_BADCONTROLINITIALIZATION;
		goto EXIT_FAIL;
	}

	if (!m_piEditorViewControl)
	{
		hr = m_pUIView->QueryInterface(DIID__RenderingControl, (LPVOID*) &m_piEditorViewControl);
		if (FAILED(hr) || (m_piEditorViewControl == NULL)) goto EXIT_FAIL;
	}

	hr = m_pUIView->DeviceToWorld( &flX, &flY, &flZ);
	if(FAILED(hr)) goto EXIT_FAIL;

	m_pUIView->get_HWND(&hWnd);

	::SetFocus(hWnd);


	//TRACE("CPolyTool::OnLButtonDown point.x = %d, y = %d, World.x = %7.2f, z = %7.2f\n", ptScreen.x, ptScreen.y, flX, flZ);
	
	// Get selected BoundaryList. Create a new an Boundary, because this is the first point of a new one.
	if(NULL == m_pBoundary)
	{
		varHitParams.vt = VT_POINT_BYREF;
		varHitParams.byref = (LPVOID) &ptScreen;

		hr = ((IVWUIView*)m_pUIView)->HitTest(varHitParams, 0, &varHitResult);	
		if( FAILED(hr)) goto EXIT_FAIL;

		//Attempt a vertex insertion if we clicked on one.
		if(varHitResult.vt != VT_EMPTY)
		{
			int nPickResult;

			nPickResult = TryInsVert(&varHitResult, ptScreen.x, ptScreen.y);

			if (nPickResult == PICKRESULT_POINTUNSAFE || nPickResult == PICKRESULT_INSERTOK || nPickResult == PICKRESULT_PERMISSION_DENIED)
			{
				if (nPickResult != PICKRESULT_INSERTOK)
					MessageBeep(MB_ICONASTERISK);

				bMakeNewBoundary = FALSE;
			}
		}

		if (bMakeNewBoundary)
		{
			//Reset all state just in case
			SAFERELEASE(m_pCurrentThing);
			SAFERELEASE(m_pCurrentThingFrame);
			SAFERELEASE(m_pCurrentBoundaryList);
			SAFERELEASE(m_pBoundary);
			m_cVertices = 0;

			hr = StartNewBoundary( &m_pBoundary );
			if( FAILED(hr) || !m_pBoundary)
			{
				MessageBeep(MB_ICONASTERISK);
				goto EXIT_FAIL; 
			}

			m_nFirstVertexX = ptScreen.x;
			m_nFirstVertexY = ptScreen.y;

			// Assume we fail.
			m_fLastVertexLegal = FALSE;

			// Insert first vertex offset by Thing's position
			//hr = m_2DThingXform.TransformToThingCoords( &flX, &flY, &flZ);
			//if(FAILED(hr)) goto EXIT_FAIL;

			vec.x = flX;
			vec.y = flY;
			vec.z = flZ;

			m_pCurrentThingFrame->InverseTransform(AXIS_Y, &vec.x, &vec.y, &vec.z, vec.x, vec.y, vec.z);

			hr = m_pBoundary->InsertVertex(-1, vec.x, vec.z);
			if( FAILED(hr) ) goto EXIT_FAIL;
//.........这里部分代码省略.........
开发者ID:opensim4opencog,项目名称:PrologVirtualWorlds,代码行数:101,代码来源:polytool.cpp

示例12: ASSERT

/////////////////////////////////////////////////////////////////////////////
//++
//
//  CBasePropertyPage::HrInit
//
//  Description:
//      Initialize the page.
//
//  Arguments:
//      peoInout
//          Pointer to the extension object.
//
//  Return Value:
//      S_OK
//          Page initialized successfully.
//
//      Other HRESULTs
//          Page failed to initialize.
//
//--
/////////////////////////////////////////////////////////////////////////////
HRESULT
CBasePropertyPage::HrInit(
    CExtObject * peoInout
    )
{
    ASSERT( peoInout != NULL );

    AFX_MANAGE_STATE( AfxGetStaticModuleState() );

    HRESULT         hr = S_OK;
    CWaitCursor     wc;
    DWORD           sc = ERROR_SUCCESS;
    CClusPropList   cpl;

    m_peo = peoInout;

    //
    //  Don't display a help button.
    //

    m_psp.dwFlags &= ~PSP_HASHELP;

    //
    //  Construct the property page.
    //

    if ( Peo()->BWizard() )
    {
        ASSERT( IddWizardPage() != NULL);
        Construct( IddWizardPage(), IdsCaption() );
    } // if: adding page to wizard
    else
    {
        ASSERT( IddPropertyPage() != NULL );
        Construct( IddPropertyPage(), IdsCaption() );
    } // else: adding page to property sheet

    //
    //  Read the properties private to this resource and parse them.
    //

    ASSERT( Peo() != NULL );
    ASSERT( Peo()->PodObjData() );

    //
    //  Read the properties.
    //

    switch ( Cot() )
    {
        case CLUADMEX_OT_CLUSTER:
        {
            CClusterData * pccd = reinterpret_cast< CClusterData * >( Peo()->PodObjData() );
            ASSERT( pccd && (pccd->GetHCluster() != NULL) );
            sc = cpl.ScGetClusterProperties(
                                      pccd->GetHCluster()
                                    , CLUSCTL_CLUSTER_GET_PRIVATE_PROPERTIES
                                    );
            break;
        }
        case CLUADMEX_OT_NODE:
        {
            CNodeData * pcnd = reinterpret_cast< CNodeData * >( Peo()->PodObjData() );
            ASSERT( pcnd && (pcnd->GetHNode() != NULL) );
            sc = cpl.ScGetNodeProperties(
                                      pcnd->GetHNode()
                                    , CLUSCTL_NODE_GET_PRIVATE_PROPERTIES
                                    );
            break;
        }
        case CLUADMEX_OT_GROUP:
        {
            CGroupData * pcgd = reinterpret_cast< CGroupData * >( Peo()->PodObjData() );
            ASSERT( pcgd && (pcgd->GetHGroup() != NULL) );
            sc = cpl.ScGetGroupProperties(
                                      pcgd->GetHGroup()
                                    , CLUSCTL_GROUP_GET_PRIVATE_PROPERTIES
                                    );
            break;
//.........这里部分代码省略.........
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:101,代码来源:BasePage.cpp

示例13: AFX_MANAGE_STATE

bool CTestDigitizerPlugIn::EnableDigitizer( bool bEnable )
{
  // In case we need to access our resources...
	AFX_MANAGE_STATE( AfxGetStaticModuleState() ); 

  // In case we need Rhino main window handle...
  HWND hwndRhino = RhinoApp().MainWnd();

	bool rc = false;

	if( bEnable )
	{
    for( ;; )
    {
      if( m_bDigitizerConnected ) 
      {
        ::RhinoApp().Print( L"Digitizer already connected.\n" );
        rc = true;
        break;
      }

      ::RhinoApp().Print( L"Connecting to digitizer ...\n" );

      /*
      Do whatever it takes to connnect to and initialize
      your digitizer here. If you need to call LoadLibrary()
      to load some communication DLL, do it here. Once you 
      have connected and initialized your digitizer, you can
      create the polling thread.
      */

      // Start up the polling thread
      m_hThread = ::CreateThread( NULL, 0, ThreadProc, this, 0, &m_dwThreadID );
      m_bDigitizerConnected = true;
      rc = true;
      break;
    }
  }
  else 
  {
    if( !m_bDigitizerConnected )
      return true;
  
    if( m_hThread ) 
    {
      ::TerminateThread( m_hThread, 0 );
      ::CloseHandle( m_hThread );
      m_hThread = 0;
    }
  
  	/*
    Shut down communications with the digitizer here. If 
    you need to call FreeLibrary to release a communications
    DLL, do it here.
    */

    m_dwThreadID = 0;
    m_bDigitizerConnected = false;
    rc = true;
  }

  return rc;
}
开发者ID:buonmethuoc,项目名称:Rhino4Samples_CPP,代码行数:63,代码来源:TestDigitizerPlugIn.cpp

示例14: AFX_MANAGE_STATE

//-------------------------------------------------------------------------------------------------//
// Class:       CHL2LoaderPlugIn
// 
// Function:    Init
// 
// Description: Initializes this particular plug-in
//
//-------------------------------------------------------------------------------------------------//
bool CHL2LoaderPlugIn::Init()
{
   AFX_MANAGE_STATE(AfxGetStaticModuleState());
   return true;
} // End of Init for CHL2LoaderPlugIn
开发者ID:kohachiro,项目名称:RenderMonkeyHL2,代码行数:13,代码来源:HL2LoaderPlugIn.cpp

示例15: DllCanUnloadNow

STDAPI DllCanUnloadNow(void)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	return AfxDllCanUnloadNow();
}
开发者ID:NickSerg,项目名称:PDFLibNet,代码行数:5,代码来源:AFPDFLib.cpp


注:本文中的AfxGetStaticModuleState函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。