當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。