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


C++ CDialog::DoModal方法代码示例

本文整理汇总了C++中CDialog::DoModal方法的典型用法代码示例。如果您正苦于以下问题:C++ CDialog::DoModal方法的具体用法?C++ CDialog::DoModal怎么用?C++ CDialog::DoModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDialog的用法示例。


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

示例1: DoneFolding

LRESULT CFoldView::DoneFolding(WPARAM wParam, LPARAM lParam) {
	CDialog* finished;
	//CMainFrame* frame = (CMainFrame*) Parent;

	if (m_save) delete foldobject.savefile;

	if (!subfold) {
		//offer to display the predicted structures if this is not subfolding
		finished = new CDialog(IDD_FINISHED,this);

		if(finished->DoModal()==IDOK) ((CRNAstructureApp*) GetFoldDocument()->pMainFrame)->Draw(m_ctname.GetBuffer(10));
	

		delete finished;
	}

	

	progress->SendMessage (WM_CLOSE);
	
	GetFoldDocument()->Frame->SendMessage(WM_CLOSE);
	
	return 0;


}
开发者ID:franfyh,项目名称:structureanalysis,代码行数:26,代码来源:FoldView.cpp

示例2: OnBnClickedButtonHtmlDialogTest

void CUITestDialog::OnBnClickedButtonHtmlDialogTest()
{
	// TODO: 在此添加控件通知处理程序代码
 //   CWindowFactory::Instance()->ShowWindow( WndWebpage, this->GetWindowId() );
	CDialog *pDlg = CWindowFactory::Instance()->NewDlg( WndWebpage );
	pDlg->DoModal();
}
开发者ID:dalinhuang,项目名称:ffmpeg-port,代码行数:7,代码来源:UITestDialog.cpp

示例3: OnBnClickedButtonControlTest

void CUITestDialog::OnBnClickedButtonControlTest()
{
	// TODO: 在此添加控件通知处理程序代码
// 	CControlTestDialog dlg;
// 	dlg.DoModal();
	CDialog *pDlg = CWindowFactory::Instance()->NewDlg( WndUnittestCtrl );
	pDlg->DoModal();
}
开发者ID:dalinhuang,项目名称:ffmpeg-port,代码行数:8,代码来源:UITestDialog.cpp

示例4: OnBnClickedButtonLoginDialogTest

void CUITestDialog::OnBnClickedButtonLoginDialogTest()
{
	// TODO: 在此添加控件通知处理程序代码
//     CWindowFactory::Instance()->ShowWindow( WndLogin, this->GetWindowId() );
//     return ;

	CDialog *pDlg = CWindowFactory::Instance()->NewDlg( WndLogin );
	pDlg->DoModal();

}
开发者ID:dalinhuang,项目名称:ffmpeg-port,代码行数:10,代码来源:UITestDialog.cpp

示例5: OnBnClickedButtonPlayerDlgNoPtz

void CUITestDialog::OnBnClickedButtonPlayerDlgNoPtz()
{
	// TODO: 在此添加控件通知处理程序代码
//	CPlayerDialog dlg;
	CMCUSession::Instance()->CurVideoSession()->PtzControl( FALSE );
//	dlg.DoModal();

//    CWindowFactory::Instance()->ShowWindow( WndPlayer, this->GetWindowId() );
	CDialog *pDlg = CWindowFactory::Instance()->NewDlg( WndPlayer );
	pDlg->DoModal();
}
开发者ID:dalinhuang,项目名称:ffmpeg-port,代码行数:11,代码来源:UITestDialog.cpp

示例6: OnBnClickedButtonPlayerDlgTest

void CUITestDialog::OnBnClickedButtonPlayerDlgTest()
{
	// TODO: 在此添加控件通知处理程序代码
//	CPlayerDialog dlg;
	CMCUSession::Instance()->CurVideoSession()->PtzControl( TRUE );
//	dlg.DoModal();

//    CWindowFactory::Instance()->ShowWindow( WndPlayer, WndUnittestUI );
	CDialog *pDlg = CWindowFactory::Instance()->NewDlg( WndPlayer );
	pDlg->DoModal();

}
开发者ID:dalinhuang,项目名称:ffmpeg-port,代码行数:12,代码来源:UITestDialog.cpp

示例7: DoneFolding

//This function is called by the backend thread
LRESULT CMEADialog::DoneFolding(WPARAM wParam, LPARAM lParam) {
	CDialog* finished;
	

	
	//offer to display the predicted structures if this is not subfolding
	finished = new CDialog(IDD_FINISHED,this);

	if(finished->DoModal()==IDOK) ((CRNAstructureApp*) GetFoldDocument()->pMainFrame)->Draw(m_CT.GetBuffer(10));
	

	delete finished;

	progress->SendMessage (WM_CLOSE);
	
	GetFoldDocument()->Frame->SendMessage(WM_CLOSE);
	
	return 0;


}
开发者ID:mayc2,项目名称:PseudoKnot_research,代码行数:22,代码来源:MEADialog.cpp

示例8: DoneFolding

LRESULT CBiFoldView::DoneFolding(WPARAM wParam, LPARAM lParam) {
	CDialog* finished;
	

	finished = new CDialog(IDD_FINISHED,this);

	if(finished->DoModal()==IDOK) ((CRNAstructureApp*) GetBiFoldDocument()->pMainFrame)->Draw(m_ctname.GetBuffer(10));
	

	delete finished;

	


	progress->SendMessage (WM_CLOSE);
	
	GetBiFoldDocument()->Frame->SendMessage(WM_CLOSE);
	
	return 0;	


}
开发者ID:franfyh,项目名称:structureanalysis,代码行数:22,代码来源:BiFoldView.cpp

示例9:

LRESULT
CCPApplet::OnRun(CWnd* pParentWnd)
{
	LRESULT		lResult = 1;
	CWnd	*	pWnd;

	InitCommonControls();

	pWnd = (CWnd*) m_uiClass->CreateObject(); 

	if ( pWnd )
	{
		lResult = ERROR_SUCCESS;

		if ( pWnd->IsKindOf( RUNTIME_CLASS( CPropertySheet ) ) )
		{
			CPropertySheet * pSheet = (CPropertySheet*) pWnd;

			pSheet->Construct(m_name, pParentWnd, m_pageNumber);

			pSheet->DoModal();
		}
		else
		{
			check( pWnd->IsKindOf( RUNTIME_CLASS( CDialog ) ) );

			CDialog * pDialog = (CDialog*) pWnd;

      		pDialog->DoModal();
    	}

		delete pWnd;
  	}

	return lResult;
}
开发者ID:StephenMacras,项目名称:dsl-n55u-bender,代码行数:36,代码来源:ControlPanel.cpp

示例10: OnAddItem

void CGenPropertyPage::OnAddItem(CDialog & dlg) 
{

  // load dialog with default values
  InitDialog (&dlg);

  // display dialog, exit if cancelled
  if (dlg.DoModal () != IDOK)
    return;

  // create the object's lookup name (label converted to lower case, or generated)
 CObject * pItem;
 CString strObjectName;

  strObjectName = GetObjectName (&dlg);
  if (strObjectName.IsEmpty ())
    strObjectName.Format ("*%s%s",       // e.g. *trigger100
                            (LPCTSTR) m_strObjectType,
                            (LPCTSTR) App.GetUniqueString ());
  else
    strObjectName.MakeLower();

  // if already there (presumably not possible with un-named objects),
  // then abort the add
  if (m_ObjectMap->Lookup (strObjectName, pItem))
    {
    CString strMsg;

    strMsg = TFormat ("The %s named \"%s\" is already in the %s list",
                  (LPCTSTR) m_strObjectType,
                  (LPCTSTR) GetObjectName (&dlg),
                  (LPCTSTR) m_strObjectType);
    ::UMessageBox (strMsg);
    return;
    }

  // add new object to map
  m_ObjectMap->SetAt (strObjectName, pItem = MakeNewObject ());

  // unload from dialog into object's properties
  UnloadDialog (&dlg, pItem);

  // They can no longer cancel the property sheet, the document has changed
  CancelToClose ();
  if (!CheckIfTemporary (pItem))
    m_doc->SetModifiedFlag (TRUE);

  // create a CString for lookup purposes
  CString * pstrObjectName = new CString (strObjectName);

  // add this item to the list view
  add_item (pItem, pstrObjectName, 0, TRUE);

  SetInternalName (pItem, strObjectName);  // set name so we can delete one-shot items

  // resort the list
  t_gen_sort_param sort_param (m_ObjectMap, m_last_col, m_reverse, m_CompareObjects);
  m_ctlList->SortItems (CompareFunc, (LPARAM) &sort_param); 

  // redraw the list
  if (GetFilterFlag ())
    LoadList ();       // full reload because it may have changed filter requirements

// get dispatch id from the script and put it into the item

  if (m_doc->m_ScriptEngine)
    {
    CString strMessage;
    SetDispatchID (pItem, m_doc->GetProcedureDispid (GetScriptName (pItem),
                                                     m_strObjectType, 
                                                     GetLabel (pItem),
                                                     strMessage));
    if (!strMessage.IsEmpty ())
      ::UMessageBox (strMessage, MB_ICONINFORMATION);
    }
  
}    // end of CGenPropertyPage::OnAddItem
开发者ID:Twisol,项目名称:mushclient,代码行数:77,代码来源:genpropertypage.cpp

示例11: OnChangeItem

void CGenPropertyPage::OnChangeItem(CDialog & dlg) 
{
CString strMsg;

// iterate through list in case we implement multiple selection one day
for (int nItem = -1;
      (nItem = m_ctlList->GetNextItem(nItem, LVNI_SELECTED)) != -1;)
  {

  // get the lower-case name of this item's object
  CString * pstrObjectName = (CString *) m_ctlList->GetItemData (nItem);

  ASSERT (pstrObjectName != NULL);

  CObject * pItem;

  // check object is still there (it might have gone while we looked at the list box)
  if (!m_ObjectMap->Lookup (*pstrObjectName, pItem))
    {
    m_ctlList->DeleteItem (nItem);    // it's gone, so delete it from the list view
    m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1);    // redraw the list

    // in the case of one-shot timers, unnamed items might be removed from the list
    if (pstrObjectName->Left (1) == "*")
      strMsg = TFormat ("The %s you selected is no longer in the %s list",
                    (LPCTSTR) m_strObjectType,
                    (LPCTSTR) m_strObjectType);
    else
      strMsg = TFormat ("The %s named \"%s\" is no longer in the %s list",
                    (LPCTSTR) m_strObjectType,
                    (LPCTSTR) *pstrObjectName,
                    (LPCTSTR) m_strObjectType);

    ::UMessageBox (strMsg);

    delete pstrObjectName;                 // and get rid of its name string
    continue;
    }

  ASSERT_VALID (pItem);
  ASSERT( pItem->IsKindOf( RUNTIME_CLASS( CObject ) ) );


  // load dialog with values from the found item
  LoadDialog (&dlg, pItem);

  // put up the dialog, give up if they cancel
  if (dlg.DoModal () != IDOK)
    continue;

  // lookup this object, to make sure it still exists
  if (!m_ObjectMap->Lookup (*pstrObjectName, pItem))
    {
    m_ctlList->DeleteItem (nItem);    // it's gone, so delete it from the list view
    m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1);    // redraw the list
    
    // in the case of one-shot timers, unnamed items might be removed from the list
    if (pstrObjectName->Left (1) == "*")
      strMsg = TFormat ("The %s you selected is no longer in the %s list",
                    (LPCTSTR) m_strObjectType,
                    (LPCTSTR) m_strObjectType);
    else
      strMsg = TFormat ("The %s named \"%s\" is no longer in the %s list",
                    (LPCTSTR) m_strObjectType,
                    (LPCTSTR) *pstrObjectName,
                    (LPCTSTR) m_strObjectType);

    delete pstrObjectName;                 // and get rid of its name string
    ::UMessageBox (strMsg);
    continue;
    }

  ASSERT_VALID (pItem);
  ASSERT( pItem->IsKindOf( RUNTIME_CLASS( CObject ) ) );

  if (CheckIfIncluded (pItem))
    {
    strMsg = TFormat ("The %s named \"%s\" has been included from an include file. You cannot modify it here.",
                  (LPCTSTR) m_strObjectType,
                  (LPCTSTR) *pstrObjectName);
    ::UMessageBox (strMsg);
    return; // can't modify included items
    }

  // check object still has the same modification number
  // (it might have been modified while we looked at the list box)
  if (GetModificationNumber (pItem) != m_nUpdateNumber)
    {
    strMsg = TFormat ("The %s named \"%s\" has already been modified by a script subroutine",
                  (LPCTSTR) m_strObjectType,
                  (LPCTSTR) *pstrObjectName);
    ::UMessageBox (strMsg);
    continue;
    }

  // check for name change 
  CString strObjectName = GetObjectName (&dlg);
  if (strObjectName.IsEmpty ())
    strObjectName.Format ("*%s%s", 
                          (LPCTSTR) m_strObjectType,
//.........这里部分代码省略.........
开发者ID:Twisol,项目名称:mushclient,代码行数:101,代码来源:genpropertypage.cpp

示例12: OnBnClickedButtonConfigDialogTest

void CUITestDialog::OnBnClickedButtonConfigDialogTest()
{
 //   CWindowFactory::Instance()->ShowWindow( WndConfig, this->GetWindowId() );
	CDialog *pDlg = CWindowFactory::Instance()->NewDlg( WndConfig );
	pDlg->DoModal();
}
开发者ID:dalinhuang,项目名称:ffmpeg-port,代码行数:6,代码来源:UITestDialog.cpp

示例13: WinMain

int WINAPI WinMain(HINSTANCE hInstance,
	HINSTANCE hPrevInstance,
	LPSTR     lpCmdLine,
	int       nCmdShow)
{
	Waifu2x::init_liblary(__argc, __argv);

	// 管理者権限で起動してもファイルのドロップを受け付けるようにする
	ChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD);
	ChangeWindowMessageFilter(WM_COPYDATA, MSGFLT_ADD);
	ChangeWindowMessageFilter(0x0049, MSGFLT_ADD);

	// Caffeのエラーでないログを保存しないようにする
	google::SetLogDestination(google::INFO, "");
	google::SetLogDestination(google::WARNING, "");

	// Caffeのエラーログを「error_log_〜」に出力
	google::SetLogDestination(google::ERROR, "error_log_");
	google::SetLogDestination(google::FATAL, "error_log_");

	// CDialogクラスでダイアログを作成する
	CDialog cDialog;
	CDialog cDialog2;
	// IDC_EDITのサブクラス
	CControl cControlInput(IDC_EDIT_INPUT);
	CControl cControlOutput(IDC_EDIT_OUTPUT);
	CControl cControlScaleRatio(IDC_EDIT_SCALE_RATIO);
	CControl cControlScaleWidth(IDC_EDIT_SCALE_WIDTH);
	CControl cControlScaleHeight(IDC_EDIT_SCALE_HEIGHT);
	CControl cControlScaleWidthHeight(IDC_EDIT_SCALE_WIDTH_HEIGHT);

	// 登録する関数がまとめられたクラス
	// グローバル関数を使えばクラスにまとめる必要はないがこの方法が役立つこともあるはず
	DialogEvent cDialogEvent;

	// クラスの関数を登録する場合

	// IDC_EDITにWM_DROPFILESが送られてきたときに実行する関数の登録
	cControlInput.SetEventCallBack(SetClassCustomFunc(DialogEvent::DropInput, &cDialogEvent), NULL, WM_DROPFILES);
	cControlOutput.SetEventCallBack(SetClassCustomFunc(DialogEvent::DropOutput, &cDialogEvent), NULL, WM_DROPFILES);

	cControlScaleRatio.SetEventCallBack(SetClassCustomFunc(DialogEvent::TextInput, &cDialogEvent), NULL, WM_CHAR);
	cControlScaleWidth.SetEventCallBack(SetClassCustomFunc(DialogEvent::TextInput, &cDialogEvent), NULL, WM_CHAR);
	cControlScaleHeight.SetEventCallBack(SetClassCustomFunc(DialogEvent::TextInput, &cDialogEvent), NULL, WM_CHAR);
	cControlScaleWidthHeight.SetEventCallBack(SetClassCustomFunc(DialogEvent::TextInput, &cDialogEvent), NULL, WM_CHAR);

	// コントロールのサブクラスを登録
	cDialog.AddControl(&cControlInput);
	cDialog.AddControl(&cControlOutput);
	cDialog.AddControl(&cControlScaleRatio);
	cDialog.AddControl(&cControlScaleWidth);
	cDialog.AddControl(&cControlScaleHeight);
	cDialog.AddControl(&cControlScaleWidthHeight);

	// 各コントロールのイベントで実行する関数の登録
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::Exec, &cDialogEvent), NULL, IDC_BUTTON_EXEC);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::Cancel, &cDialogEvent), NULL, IDC_BUTTON_CANCEL);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::InputRef, &cDialogEvent), NULL, IDC_BUTTON_INPUT_REF);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::OutputRef, &cDialogEvent), NULL, IDC_BUTTON_OUTPUT_REF);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::ClearOutputDir, &cDialogEvent), NULL, IDC_BUTTON_CLEAR_OUTPUT_DIR);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::AppSetting, &cDialogEvent), NULL, IDC_BUTTON_APP_SETTING);

	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::OnModeChange, &cDialogEvent), NULL, IDC_RADIO_MODE_NOISE);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::OnModeChange, &cDialogEvent), NULL, IDC_RADIO_MODE_SCALE);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::OnModeChange, &cDialogEvent), NULL, IDC_RADIO_MODE_NOISE_SCALE);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::OnModeChange, &cDialogEvent), NULL, IDC_RADIO_AUTO_SCALE);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::OnModeChange, &cDialogEvent), NULL, IDC_RADIO_SCALE_WIDTH_HEIGHT);

	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::UpdateAddString, &cDialogEvent), NULL, IDC_RADIONOISE_LEVEL0);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::UpdateAddString, &cDialogEvent), NULL, IDC_RADIONOISE_LEVEL1);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::UpdateAddString, &cDialogEvent), NULL, IDC_RADIONOISE_LEVEL2);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::UpdateAddString, &cDialogEvent), NULL, IDC_RADIONOISE_LEVEL3);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::UpdateAddString, &cDialogEvent), NULL, IDC_CHECK_TTA);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::UpdateAddString, &cDialogEvent), NULL, IDC_COMBO_OUTPUT_DEPTH);

	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::ScaleRadio, &cDialogEvent), NULL, IDC_RADIO_SCALE_RATIO);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::ScaleRadio, &cDialogEvent), NULL, IDC_RADIO_SCALE_WIDTH);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::ScaleRadio, &cDialogEvent), NULL, IDC_RADIO_SCALE_HEIGHT);

	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::CheckCUDNN, &cDialogEvent), NULL, IDC_BUTTON_CHECK_CUDNN);

	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::LangChange, &cDialogEvent), NULL, IDC_COMBO_LANG);
	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::OutExtChange, &cDialogEvent), NULL, IDC_COMBO_OUT_EXT);

	cDialog.SetCommandCallBack(SetClassFunc(DialogEvent::OnModelChange, &cDialogEvent), NULL, IDC_COMBO_MODEL);

	// ダイアログのイベントで実行する関数の登録
	cDialog.SetEventCallBack(SetClassFunc(DialogEvent::Create, &cDialogEvent), NULL, WM_INITDIALOG);
	cDialog.SetEventCallBack(SetClassFunc(DialogEvent::OnDialogEnd, &cDialogEvent), NULL, WM_CLOSE);
	cDialog.SetEventCallBack(SetClassFunc(DialogEvent::OnFaildCreateDir, &cDialogEvent), NULL, WM_FAILD_CREATE_DIR);
	cDialog.SetEventCallBack(SetClassFunc(DialogEvent::OnWaifu2xError, &cDialogEvent), NULL, WM_ON_WAIFU2X_ERROR);
	cDialog.SetEventCallBack(SetClassFunc(DialogEvent::OnWaifu2xNoOverwrite, &cDialogEvent), NULL, WM_ON_WAIFU2X_NO_OVERWRITE);
	cDialog.SetEventCallBack(SetClassFunc(DialogEvent::WaitThreadExit, &cDialogEvent), NULL, WM_END_THREAD);
	cDialog.SetEventCallBack(SetClassFunc(DialogEvent::Timer, &cDialogEvent), NULL, WM_TIMER);

	// ダイアログを表示
	cDialog.DoModal(hInstance, IDD_DIALOG);

	Waifu2x::quit_liblary();

//.........这里部分代码省略.........
开发者ID:lltcggie,项目名称:waifu2x-caffe,代码行数:101,代码来源:Source.cpp

示例14: OnDblclkPropertieslist

void CEntitiesDialog::OnDblclkPropertieslist() 
{
	// Double-click on the item...Edit it.
	mCurrentKey = m_PropertiesList.GetCurSel ();

	if (mCurrentKey != LB_ERR)
	{
		CEntity *Ent = &((*mEntityArray)[mCurrentEntity]);
		CString EntityTypeName = Ent->GetClassname ();
		CString KeyName;
		CString TheValue;

		m_PropertiesList.GetText (mCurrentKey, KeyName);
		Ent->GetKeyValue (KeyName, TheValue);

		
		TopType eType;
		
		if (EntityTable_GetEntityPropertyType (Level_GetEntityDefs (pDoc->pLevel), EntityTypeName, KeyName, &eType))
		{
			CDialog *pEditDialog = NULL;

			// Create the dialog that's appropriate for this type....
			switch (eType)
			{
				case T_INT :
					pEditDialog = new CIntKeyEditDlg (this, KeyName, &TheValue);
					break;
				case T_FLOAT :
					pEditDialog = new CFloatKeyEditDlg (this, KeyName, &TheValue);
					break;
				case T_COLOR :
					pEditDialog = new CColorKeyEditDlg (this, KeyName, &TheValue);
					break;
				case T_POINT :
					pEditDialog = new CPointKeyEditDlg (this, KeyName, &TheValue);
					break;
				case T_STRING :
					pEditDialog = new CKeyEditDlg (this, KeyName, &TheValue);
					break;
				case T_MODEL :
					pEditDialog = new CModelKeyEditDlg (this, Level_GetModelInfo (pDoc->pLevel)->Models, KeyName, &TheValue);
					break;
				case T_STRUCT :
					pEditDialog = new CStructKeyEditDlg (this, *Ent, KeyName, mEntityArray, &TheValue, Level_GetEntityDefs (pDoc->pLevel));
					break;
				case T_BOOLEAN :
					pEditDialog = new CBoolKeyEditDlg (this, KeyName, &TheValue);
					break;
				case T_PTR :
				default :
					// bad or unknown type
					assert (0);
					break;
			}

			if (pEditDialog != NULL)
			{
				int ModalResult = pEditDialog->DoModal ();

				delete pEditDialog;

				if (ModalResult == IDOK)
				{
					if (MultiEntityFlag)
					{
						// multiple entities--change this property on all of them
						int i;

						for (i = 0; i < mEntityArray->GetSize (); ++i)
						{
							CEntity *pEnt;

							pEnt = &(*mEntityArray)[i];
							if (pEnt->IsSelected ())
							{
								pEnt->SetKeyValue (KeyName, TheValue);
							}
						}
					}
					else
					{
						// update
						Ent->SetKeyValue (KeyName, TheValue);
					}
					FillInKeyValuePairs(mCurrentKey);
				}
			}
		}
	}
}
开发者ID:RealityFactory,项目名称:Genesis3D-Tools,代码行数:91,代码来源:EntitiesDialog.cpp


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