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


C++ ShowModal函数代码示例

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


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

示例1: while

//---------------------------------------------------------------------------
int __fastcall TFileLoadSave::ShowModal(FileNum path,AnsiString& currname,AnsiString& currtitle,FileModes mode)
{
	int i=0;
	while(dirnums[i] && dirnums[i]!=FileNum(int(path)&0xff00))
    	i++;
    if (dirnums[i]==0)
    {
    	if (path)
        {
	    	CurrDirNum=FileNum(int(path)&0xff00);
		    dirnums[1+1]=CurrDirNum;
            char pathbuff[80];
            char* n=FILEMAN.namenumberedfilelessfail(CurrDirNum);
            char* c;
            for (c=n+strlen(n);*c!='\\';--c)
	            *c=0;
            strcpy(pathbuff,n);
			return ShowModal(pathbuff,currname,currtitle,mode);
        }
        else
        {
    	    i=0;
	        CurrDirNum=dirnums[i];
        }
    }
	PathList->ItemIndex=i;
	return ShowModal(PathList->Items->Strings[i],currname,currtitle,mode);
}
开发者ID:gondur,项目名称:BOB_Src,代码行数:29,代码来源:LOADSAVE.CPP

示例2: Sort

//---------------------------------------------------------------------
int __fastcall TACalResDlg::Execute(CACal *p)
{
	pACal = p;
	mmax = pACal->GetMV();
	int i;
	MVAL *mp = mval;
	for( i = 0; i < mmax; i++, mp++ ){
		pACal->ReadMV(mp, i);
	}
	Grid->RowCount = mmax + 1;
	char bf[256];
	pACal->SetTradeStr(bf);
	CalCond->Caption = bf;
	if( !pACal->atrg.TF ){
		if( pACal->amax >= 2 ){
			Grid->ColCount = Grid->ColCount + pACal->amax - 1;
		}
	}
	Sort(0);
	ScrollIndex(GetCurIndex());
	SetupPtn(Grid->Row);

	// ダイアログボックスを開く
	if( ShowModal() == IDOK ){
		if( Grid->Row ){
			int Row = Grid->Row - 1;
			for( i = 0; i < pACal->amax; i++ ){
				pACal->SetPara(i, mval[Row].AD[i]);
			}
			pACal->WList.Update();
			return TRUE;
		}
	}
	return FALSE;
}
开发者ID:ja7ude,项目名称:MMANA,代码行数:36,代码来源:ACalRes.cpp

示例3: ShowModal

DWORD CAbout::DoModal()
{
	if(! this->m_hWnd)
		return -1;
	m_bModal = true;
	return ShowModal();
}
开发者ID:wyrover,项目名称:myduilib1,代码行数:7,代码来源:About.cpp

示例4: GetProfilesSheet

//---------------------------------------------------------------------------
bool __fastcall TLocationProfilesDialog::Execute()
{
  bool Result;
  PageControl->ActivePage = GetProfilesSheet();
  FBookmarkSelected = false;
  Result = (ShowModal() == DefaultResult(this));
  if (Terminal)
  {
    WinConfiguration->Bookmarks[FSessionKey] = FSessionBookmarkList;
    WinConfiguration->SharedBookmarks = FSharedBookmarkList;
    WinConfiguration->UseSharedBookmarks = (PageControl->ActivePage == SharedProfilesSheet);
  }
  if (Result)
  {
    if (FBookmarkSelected)
    {
      Configuration->Usage->Inc(L"OpenedBookmark");
    }
    else
    {
      Configuration->Usage->Inc(L"OpenedPath");
    }
  }
  return Result;
}
开发者ID:elazzi,项目名称:winscp,代码行数:26,代码来源:LocationProfiles.cpp

示例5: GetFieldValues

// ---------------------------------------------------------------------------
Ibcustomdataset::TIBUpdateAction __fastcall TUpdateErrorForm::HandleError
	(Data::Db::TDataSet* DataSet, Data::Db::EDatabaseError* E,
	Data::Db::TUpdateKind UpdateKind) {
	const System::UnicodeString UpdateKindStr[3] = {
		"Modified", "Inserted", "Deleted"};
	// Put the error context information into the labels on the form
	UpdateType->Caption = UpdateKindStr[UpdateKind];
	ErrorText->Caption = E->Message;
	// Fill the string grid with the update field values
	GetFieldValues(DataSet);
	ShowModal();
	switch (ModalResult) {
	case mrRetry:
		// If user wants to retry, then put any changed values from the
		// string grid back into the associated field's NewValue property }
		SetFieldValues(DataSet);
		return Ibcustomdataset::uaRetry;
		break;
	case mrIgnore:
		return Ibcustomdataset::uaSkip;
		break;
	default:
		return Ibcustomdataset::uaAbort;
	}
}
开发者ID:SkylineNando,项目名称:Delphi,代码行数:26,代码来源:Errform.cpp

示例6: DecodeData

void TEditDataForm::Go(int BlockNo, int Mx, int My)
{
        AnsiString text;

        if (CharSet->ItemIndex == -1) CharSet->ItemIndex=1;

        Top = My - Height/2;
        Left = Mx - Width/2;
        if (Top<0) Top=0;
        if (Left<0) Left=0;
        if (Left+Width > Screen->Width) Left = Screen->Width - Width;
        if (Top+Height > Screen->Height) Top = Screen->Height - Height;

        Block=BlockNo;
        DecodeData(Block);
        ActiveControl= OK;
        ShowModal();

        /*
        TZXFile.Tape[BlockNo].Pause = Pause->Text.ToInt();
        TZXFile.Tape[BlockNo].Head.General.FinalBits = UsedBits->Text.ToInt();

        TZXFile.Tape[BlockNo].Head.General.Flags = LevelHigh->Checked;

        TZXFile.Tape[BlockNo].Head.General.PilotLen = PPL->Text.ToInt();
        TZXFile.Tape[BlockNo].Head.General.PilotPulses = NoPP->Text.ToInt();
        */
}
开发者ID:charlierobson,项目名称:EightyOne,代码行数:28,代码来源:tzxEditData.cpp

示例7: Run

	bool Run(wxWindow* parent, const wxString& m_local_dir, int count_files, int count_dirs)
	{
		if (!Load(parent, _T("ID_SEARCH_DOWNLOAD")))
			return false;

		wxString desc;
		if (!count_dirs)
			desc.Printf(wxPLURAL("Selected %d file for transfer.", "Selected %d files for transfer.", count_files), count_files);
		else if (!count_files)
			desc.Printf(wxPLURAL("Selected %d directory with its contents for transfer.", "Selected %d directories with their contents for transfer.", count_dirs), count_dirs);
		else
		{
			wxString files = wxString::Format(wxPLURAL("%d file", "%d files", count_files), count_files);
			wxString dirs = wxString::Format(wxPLURAL("%d directory with its contents", "%d directories with their contents", count_dirs), count_dirs);
			desc.Printf(_("Selected %s and %s for transfer."), files.c_str(), dirs.c_str());
		}
		XRCCTRL(*this, "ID_DESC", wxStaticText)->SetLabel(desc);

		XRCCTRL(*this, "ID_LOCALPATH", wxTextCtrl)->ChangeValue(m_local_dir);

		if (ShowModal() != wxID_OK)
			return false;

		return true;
	}
开发者ID:pappacurds,项目名称:filezilla,代码行数:25,代码来源:search.cpp

示例8: Refresh

  void __fastcall TSuperGroups::OpenForm()
{
	UWord i;
	for (i = 0; i < MAXLOADEDSUPERGROUPS;i++)
		MissionEditor->tmploadedsupergroup[i] = MissionEditor->loadedsupergroup[i];

	SuperGroupGrid->Rows[0]->SetText("Name\nCurrent\nViewable\nMovable\nDeletable\nNew\nChanged");

	Refresh();

	int result = ShowModal();
	switch (result)
	{
		case	mrOk:
		  {

				break;
		  }
		case	mrCancel:
		  {
				for (i = 0; i < MAXLOADEDSUPERGROUPS;i++)
					MissionEditor->loadedsupergroup[i] = MissionEditor->tmploadedsupergroup[i];
				 break;
		  }
	  }

}
开发者ID:gondur,项目名称:mig_src,代码行数:27,代码来源:SGROUPS.CPP

示例9: StrDbl

//---------------------------------------------------------------------
// 検索と置き換えの実行
int __fastcall TValRepDlg::Execute(double &nd, double &od)
{
	double od1, od2;
	double nd1, nd2;

	int f = FALSE;
	RepSel->Enabled = FALSE;
	InvSel->Enabled = FALSE;
	EditOld->Text = StrDbl(od);
	EditNew->Text = StrDbl(od);
	Calc(od1, AnsiString(EditOld->Text).c_str());
	Calc(nd1, AnsiString(EditNew->Text).c_str());
	if( ShowModal() == IDOK ){
		Calc(od2, AnsiString(EditOld->Text).c_str());
		Calc(nd2, AnsiString(EditNew->Text).c_str());
		if( od1 != od2 ){
			od = od2;
		}
		if( nd1 != nd2 ){
			nd = nd2;
		}
		if( od != nd ) f = TRUE;
	}
	return f;
}
开发者ID:ja7ude,项目名称:MMANA,代码行数:27,代码来源:ValRep.cpp

示例10: wxDialog

job_log_dialog::job_log_dialog(wxWindow *parent,
                               wxString &log)
  : wxDialog(parent, -1, Z("Job output"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
  , text(log)
  , m_geometry_saver{this, "job_log_dialog"}
{
  wxBoxSizer *siz_all = new wxBoxSizer(wxVERTICAL);
  siz_all->Add(new wxStaticText(this, -1, Z("Output of the selected jobs:")), 0, wxALIGN_LEFT | wxLEFT | wxTOP, 10);
  siz_all->AddSpacer(5);
  siz_all->Add(new wxTextCtrl(this, -1, log, wxDefaultPosition, wxSize(550, 150), wxTE_MULTILINE | wxTE_READONLY), 1, wxGROW | wxLEFT | wxRIGHT, 10);

  wxBoxSizer *siz_buttons = new wxBoxSizer(wxHORIZONTAL);
  wxButton *b_ok          = new wxButton(this, wxID_OK, Z("&Ok"));
  b_ok->SetDefault();
  siz_buttons->Add(1,    0, 1, wxGROW, 0);
  siz_buttons->Add(b_ok, 0, 0, 0);
  siz_buttons->Add(1,    0, 1, wxGROW, 0);
  siz_buttons->Add(new wxButton(this, ID_JOBS_B_SAVE_LOG, Z("&Save")), 0, 0, 0);
  siz_buttons->Add(1, 0, 1, wxGROW, 0);
  siz_all->Add(siz_buttons, 0, wxGROW | wxTOP | wxBOTTOM, 10);
  siz_all->SetSizeHints(this);
  SetSizerAndFit(siz_all);

  m_geometry_saver.set_default_size(900, 500, true).restore();

  ShowModal();
}
开发者ID:CheesyWiggles,项目名称:mkvtoolnix,代码行数:27,代码来源:jobs.cpp

示例11: ShowModal

//---------------------------------------------------------------------------
void __fastcall TMissionTextDlg::OpenForm()
{
	MissionDescriptionText->Lines->SetText("disabled feature");
//		MissionEditor->ActiveCampaign.mission[MissionEditor->currmission].missiontext);
//	MissionNewsText->Lines->SetText("disabled this feature too");
//		MissionEditor->ActiveCampaign.mission[MissionEditor->currmission].newstext);

//camp	if (MissionEditor->MissionMode)
		NewsTextSheet->Enabled = false;
//	else
//		NewsTextSheet->Enabled = true;

	int result = ShowModal();
	switch (result)
	{
		case	mrOk:
		  {
			MissionEditor->loadedbfs[MissionEditor->bfieldbeingfilled].changed=true;
//			MissionEditor->MissionEdited=true;
//			strcpy(MissionEditor->ActiveCampaign.mission[MissionEditor->currmission].missiontext,
  //					MissionTextDlg->MissionDescriptionText->Lines->GetText());
//			strcpy(MissionEditor->ActiveCampaign.mission[MissionEditor->currmission].newstext,
  //					MissionTextDlg->MissionNewsText->Lines->GetText());
			if (MissionEditor->currmission == 0)
//			strcpy(MissionEditor->ActiveCampaign.firstmission,
  //					MissionTextDlg->MissionDescriptionText->Lines->GetText());

				break;
		  }
		case	mrCancel:
		  {
				 break;
		  }
	  }
}
开发者ID:xor2003,项目名称:bob-flight-sim,代码行数:36,代码来源:misstext.cpp

示例12: assert

//---------------------------------------------------------------------------
bool __fastcall TRemoteTransferDialog::Execute(void *& Session, UnicodeString & Target,
  UnicodeString & FileMask, bool & DirectCopy)
{
  FCurrentSession = -1;
  for (int Index = 0; Index < SessionCombo->Items->Count; Index++)
  {
    if (SessionCombo->Items->Objects[Index] == Session)
    {
      FCurrentSession = Index;
      SessionCombo->ItemIndex = Index;
      break;
    }
  }
  assert(FCurrentSession >= 0);
  DirectoryEdit->Items = CustomWinConfiguration->History[L"RemoteTarget"];
  DirectoryEdit->Text = UnixIncludeTrailingBackslash(Target) + FileMask;
  FDirectCopy = DirectCopy;
  NotDirectCopyCheck->Checked = !DirectCopy;
  bool Result = (ShowModal() == DefaultResult(this));
  if (Result)
  {
    Session = SessionCombo->Items->Objects[SessionCombo->ItemIndex];
    CustomWinConfiguration->History[L"RemoteTarget"] = DirectoryEdit->Items;
    Target = UnixExtractFilePath(DirectoryEdit->Text);
    FileMask = UnixExtractFileName(DirectoryEdit->Text);
    DirectCopy = !NotDirectCopyCheck->Checked;
  }
  return Result;
}
开发者ID:elazzi,项目名称:winscp,代码行数:30,代码来源:RemoteTransfer.cpp

示例13: SetParams

//---------------------------------------------------------------------------
bool __fastcall TCustomCommandDialog::Execute(TCustomCommandType & Command)
{
  CommandEdit->Items = CustomWinConfiguration->History[L"CustomCommand"];
  if (CommandEdit->Items->Count == 0)
  {
    for (int i = 0; i < FCustomCommandList->Count; i++)
    {
      CommandEdit->Items->Add(FCustomCommandList->Commands[i]->Name);
    }
  }

  DescriptionEdit->Text = Command.Name;
  FOrigDescription = Command.Name;
  CommandEdit->Text = Command.Command;
  SetParams(Command.Params);
  if (FMode != ccmAdHoc)
  {
    SetShortCutCombo(ShortCutCombo, Command.ShortCut);
  }

  bool Result = (ShowModal() == DefaultResult(this));
  if (Result)
  {
    GetCommand(Command);

    CommandEdit->SaveToHistory();
    CustomWinConfiguration->History[L"CustomCommand"] = CommandEdit->Items;
  }
  return Result;
}
开发者ID:mpmartin8080,项目名称:winscp,代码行数:31,代码来源:CustomCommand.cpp

示例14: wxBoxSizer

void mxLongTextEditor::CreateCommonStuff(wxString value) {
	
	last_dir=config->Files.last_dir;
	
	wxBoxSizer *mid_sizer = new wxBoxSizer(wxVERTICAL);
	wxBoxSizer *bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
	
	my_text = new wxTextCtrl(this,wxID_ANY,value,wxDefaultPosition,wxDefaultSize,wxTE_MULTILINE);
	mid_sizer->Add(my_text,sizers->BA5_Exp1);
	wxButton *button_ok = new mxBitmapButton(this,wxID_OK,bitmaps->buttons.ok,LANG(GENERAL_OK_BUTTON,"&Aceptar"));
	wxButton *button_cancel = new mxBitmapButton(this,wxID_CANCEL,bitmaps->buttons.cancel,LANG(GENERAL_CANCEL_BUTTON,"&Cancelar"));
	wxButton *button_more = new wxButton(this,mxID_ARGS_BUTTON,LANG(LONGTEXT_MORE_OPTIONS,"Mas opciones..."));
	wxBitmapButton *button_help = new wxBitmapButton (this,mxID_HELP_BUTTON,*bitmaps->buttons.help);
	bottom_sizer->Add(button_help,sizers->BA5_Exp0);
	bottom_sizer->AddStretchSpacer();
	bottom_sizer->Add(button_more,sizers->BA5);
	bottom_sizer->AddStretchSpacer();
	bottom_sizer->Add(button_cancel,sizers->BA5);
	bottom_sizer->Add(button_ok,sizers->BA5);
	mid_sizer->Add(bottom_sizer,sizers->Exp0);
	
	button_ok->SetDefault(); 
	my_text->SetSelection(0,my_text->GetLastPosition());
	my_text->SetFocus();
	
	SetSizer(mid_sizer);
	ShowModal();
	
}
开发者ID:JD26,项目名称:ICE,代码行数:29,代码来源:mxLongTextEditor.cpp

示例15: GetItem

//---------------------------------------------------------------------
int __fastcall TColorSetDlg::Execute(TColor *pcol)
{
	int i, x, f;
	int n = 0;
	int pos = -1;
	for( i = 0; i < 8; i++ ){
		f = 0;
		for( x = 0; x < 4; x++, n++ ){
			GetItem(i, x)->Color = sys.m_ColorSet[n];
			if( pcol[x] != sys.m_ColorSet[n] ) f++;
		}
		if( !f ){
			pos = i;
		}
	}
	RGSet->ItemIndex = pos;
	if( ShowModal() == IDOK ){
		n = 0;
		for( i = 0; i < 8; i++ ){
			for( x = 0; x < 4; x++, n++ ){
				sys.m_ColorSet[n] = GetItem(i, x)->Color;
			}
		}
		if( RGSet->ItemIndex >= 0 ){
			for( x = 0; x < 4; x++ ){
				pcol[x] = GetItem(RGSet->ItemIndex, x)->Color;
			}
			return TRUE;
		}
	}
	return FALSE;
}
开发者ID:mygaldre,项目名称:mmsstv,代码行数:33,代码来源:ColorSet.cpp


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