• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ MessageDlg函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: TMsgDlgButtons

//---------------------------------------------------------------------------
void __fastcall TMainForm::DeleteMemPhotoButtonClick(TObject *Sender)
{
    if (!DBGrid->Fields[13]->AsString.IsEmpty()) {
		if (MessageDlg("Вы уверены, что хотите удалить фото в этой записи?",
			mtWarning, TMsgDlgButtons() << mbYes << mbNo, 0) == 6) {

			AnsiString photoFile = GetAppPath()+"Photo\\"+DBGrid->Fields[13]->AsString+".jpg";
			int ID = DBGrid->Fields[14]->AsInteger;
			AnsiString query = "UPDATE tblMembers SET mPhoto = '' WHERE ID = " + AnsiString(ID);
			CMData->ADOQuery->SQL->Clear();
			CMData->ADOQuery->SQL->Add(query);
			CMData->ADOQuery->ExecSQL();
			query = AnsiString("select mSur, mName, mPat, mBD, mCD, mNat, mAdd, mTel, mFam, mPro, ") +
				AnsiString ("mLife, mSug, mEtc, mPhoto, ID from tblMembers order by mSur, mName, mPat");
			CMData->ADOQuery->SQL->Clear();
			CMData->ADOQuery->SQL->Add(query);
			CMData->ADOQuery->Open();

			if (FileExists(photoFile)) {
				DeleteFileA(photoFile);
			} else {
				MessageDlg("Файл '" + photoFile + "' не найден!", mtError, TMsgDlgButtons() << mbOK, 0);
			}
		}
	} else
		MessageDlg("Данная запись не содержит фото!", mtWarning, TMsgDlgButtons() << mbOK, 0);
}
开发者ID:rkazakov,项目名称:ChurchManager,代码行数:28,代码来源:MainFrm.cpp


示例2: MessageDlg

//---------------------------------------------------------------------------
void __fastcall TfrmMain::btnLoadIdeClick(TObject *Sender)
{
  TStringList *aFileStringList;
  AnsiString SearchPathExpr;

  if (ModuleOfAddr(TheFormArray[FormID]->ClassInfo()) == "")
  {
    MessageDlg("This functionality is disabled unless\n"
               "you build the demo from the C++ Builder IDE\n"
               "with map file generation enabled.", mtWarning, TMsgDlgButtons() << mbOK, 0);
    return;
  }

  // uses the function "ModuleOfAddr" from JclDebug unit to get the unit name
  SearchPathExpr = ExtractFilePath(Application->ExeName) +
    ModuleOfAddr(TheFormArray[FormID]->ClassInfo()) + "->pas";
  StrReplace(SearchPathExpr, "\bin", "\examples", TReplaceFlags() << rfIgnoreCase);

  // uses AdvBuildFileList to get the file location in the example diretory tree
  aFileStringList = new TStringList();
  AdvBuildFileList(SearchPathExpr, faAnyFile, aFileStringList, amAny,
   TFileListOptions() << flFullNames << flRecursive, "", NULL);

 if (aFileStringList->Count < 1)
   MessageDlg("File not found", mtError, TMsgDlgButtons() << mbOK, 0);
 else
   ShellExecute(0,
                NULL,
                ("\"" + aFileStringList->Strings[0] + "\"").c_str(),
                NULL,
                NULL,
                SW_SHOWNORMAL);

 delete aFileStringList;
}
开发者ID:Chevich,项目名称:KsmProjAddons,代码行数:36,代码来源:MainForm.cpp


示例3: count

void __fastcall TForm6::Image2Click(TObject *Sender)
{
        if(!Edit1->Text.IsEmpty()){
                String cadena;
                int total;
                cadena="select count(*) as total from modelo where nombre='"+Edit1->Text+"'";
                Query1->Close();
                Query1->SQL->Clear();
                Query1->SQL->Add(cadena);
                Query1->Active=true;
                total=Query1->FieldByName("total")->Value;
                if(total!=1){
                cadena="insert into modelo values(null,'"+Edit1->Text+"',"+marca_id+")";
                Query1->Close();
                Query1->SQL->Clear();
                Query1->SQL->Add(cadena);
                Query1->ExecSQL();
                MessageDlg("Agregado con Éxito", mtInformation, TMsgDlgButtons() << mbOK, 0);
                Edit1->Clear();
                Form6->Close();
                Form4->modelo();
                }else{
                        MessageDlg("El modelo está ya repetido. Intente con otro", mtInformation, TMsgDlgButtons() << mbOK, 0);
                }
        }else{
                MessageDlg("No ha ingresado Modelo", mtInformation, TMsgDlgButtons() << mbOK, 0);
        }
}
开发者ID:jose1zapata,项目名称:guardando,代码行数:28,代码来源:Unit6.cpp


示例4: StrToInt

void __fastcall TForm1::Button1Click(TObject *Sender)
{
 AnsiString s;

  if (tblDest->TableName == "")
    tblDest->TableName = cmbxDestTable->Text;
  if ((dbSource->DatabaseFileName != "") && // test for enough input
     (tblSource->TableName != "") &&
     (dbDest->DatabaseFileName != "") &&
     (tblDest->TableName != "") &&
     (cmbxMode->Items->Strings[cmbxMode->ItemIndex] != ""))
  {
    BatchMove1->ChangedTableName = edtChangedTable->Text;  // more batchmove setup
    BatchMove1->KeyViolTableName = edtKeyVioTbl->Text;
    BatchMove1->ProblemTableName = edtProbTbl->Text;
    BatchMove1->RecordCount = StrToInt(edtRecCount->Text);
    BatchMove1->CommitCount = StrToInt(edtCommitCount->Text);
    BatchMove1->Source = tblSource;
    BatchMove1->Destination = tblDest;
  }
 else
  {
    MessageDlg("Incomplete input->",mtError,TMsgDlgButtons()<<mbOK,0);
    return;
  };
  BatchMove1->Execute();  // run the batchmove
  s = "BatchMove complete. Number of records applied: "+IntToStr(BatchMove1->MovedCount)+
       "\r\n" + "Problem record count: "+ IntToStr(BatchMove1->ProblemCount) +
       "\r\n" + "Changed record count: "+ IntToStr(BatchMove1->ChangedCount) +
       "\r\n" + "Key violation count: "+ IntToStr(BatchMove1->KeyViolCount);
  MessageDlg(s,mtInformation,TMsgDlgButtons()<<mbOK,0);
}
开发者ID:vagabond1132,项目名称:Code,代码行数:32,代码来源:uMain.cpp


示例5: MessageDlg

//---------------------------------------------------------------------------
void __fastcall TForm1::ResetBtClick(TObject *Sender)
{
  if (!ResetNetAccessFile(FileNameEd->Text, Key))
    MessageDlg("Unable to reset network access file.",
    	mtError,  TMsgDlgButtons() << mbOK, 0);
  else
    if (!UpdateInfoLabels(FileNameEd->Text))
      MessageDlg("Unable read network access file.",
      	mtError,  TMsgDlgButtons() << mbOK, 0);
}
开发者ID:gzwplato,项目名称:TPOnGuard,代码行数:11,代码来源:NAFMGR1.cpp


示例6: TMsgDlgButtons

void __fastcall TFrmTransDemo::BtnCommitEditsClick(TObject *Sender) {
	if ((DmEmployee->IBTransaction1->InTransaction) &&
		(MessageDlg("Are you sure you want to commit your changes?",
		mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0) == mrYes)) {
		DmEmployee->IBTransaction1->Commit();
		DmEmployee->IBTransaction1->StartTransaction();
		DmEmployee->EmployeeTable->Open();
		DmEmployee->EmployeeTable->Refresh();
	}
	else
		MessageDlg("Can't Commit Changes: No Transaction Active", mtError,
		TMsgDlgButtons() << TMsgDlgBtn::mbOK, 0);
}
开发者ID:SkylineNando,项目名称:Delphi,代码行数:13,代码来源:FrmTrans.cpp


示例7: switch

//{E_NO_MEMORY, E_NO_PAGES, E_BAD_ADDRESS, E_BAD_BOUNDARY, E_MULTIPLE_FREE, E_CORRUPTED_BLOCK};
void  __fastcall TfrmObjAllocMain::GenerateError(void)
{
	OAException::OA_EXCEPTION ex = static_cast<OAException::OA_EXCEPTION>(grpErrors->ItemIndex);
	try
	{
		PStudent free = const_cast<PStudent>(reinterpret_cast<const TStudent *>(FStudentObjectMgr->GetFreeList()));
		PStudent student = 0;
		if (FStudents->Count)
			student = reinterpret_cast<PStudent>(FStudents->Items[0]);
		switch (ex)
		{
			case OAException::E_NO_MEMORY:
				MessageDlg(AnsiString("No exception thrown.\n\nNot implemented in driver."), mtInformation, TMsgDlgButtons() << mbOK, 0);
			break;

			case OAException::E_NO_PAGES:
				TestNoPages();
			break;

			case OAException::E_BAD_BOUNDARY:
				if (chkDebugState->Checked)
					if (student)
						FStudentObjectMgr->Free(reinterpret_cast<char *>(student) + 3);
					else
						MessageDlg(AnsiString("No exception thrown.\n\nNo blocks allocated."), mtInformation, TMsgDlgButtons() << mbOK, 0);
				else
					MessageDlg(AnsiString("No exception thrown.\n\nDebug information is disabled."), mtInformation, TMsgDlgButtons() << mbOK, 0);
			break;

			case OAException::E_BAD_ADDRESS:
				if (chkDebugState->Checked)
					FStudentObjectMgr->Free(reinterpret_cast<void *>(100));
				else
					MessageDlg(AnsiString("No exception thrown.\n\nDebug information is disabled."), mtInformation, TMsgDlgButtons() << mbOK, 0);
			break;

			case OAException::E_MULTIPLE_FREE:
				if (chkDebugState->Checked)
					if (free)
						FStudentObjectMgr->Free(free);
					else
						MessageDlg(AnsiString("No exception thrown.\n\nNo blocks on the free list."), mtInformation, TMsgDlgButtons() << mbOK, 0);
				else
					MessageDlg(AnsiString("No exception thrown.\n\nDebug information is disabled."), mtInformation, TMsgDlgButtons() << mbOK, 0);
			break;

			case OAException::E_CORRUPTED_BLOCK:
				if (chkDebugState->Checked)
					TestCorruption();
				else
					MessageDlg(AnsiString("No exception thrown.\n\nDebug information is disabled."), mtInformation, TMsgDlgButtons() << mbOK, 0);
			break;
		}
	}
	catch (const OAException& e)
	{
		MessageDlg(AnsiString("Exception caught!\n\n") +  e.what(), mtError, TMsgDlgButtons() << mbOK, 0);
		//ShowMessage(e.what());
	}
}
开发者ID:gamezatwork,项目名称:personal,代码行数:61,代码来源:ObjAllocMain.cpp


示例8: GetAppPath

//---------------------------------------------------------------------------
void __fastcall TMainForm::ViewMemPhotoButtonClick(TObject *Sender)
{
	if (!DBGrid->Fields[13]->AsString.IsEmpty()) {
		HWND h;
		AnsiString photoFile = GetAppPath()+"Photo\\"+DBGrid->Fields[13]->AsString+".jpg";

		if (FileExists(photoFile))
			ShellExecute(h, "open", photoFile.c_str(), NULL, NULL, SW_SHOW);
		else
			MessageDlg("Файл '" + photoFile + "' не найден!", mtError, TMsgDlgButtons() << mbOK, 0);
	} else {
		MessageDlg("Для этой записи еще нет фото!", mtWarning, TMsgDlgButtons() << mbOK, 0);    	
	}
}
开发者ID:rkazakov,项目名称:ChurchManager,代码行数:15,代码来源:MainFrm.cpp


示例9: delWork

// удаление работы с данным номером
bool TController::delWork(int khr, int work)
{
	if(MessageDlg("Удалить выбранную работу из проекта?",
					mtWarning, TMsgDlgButtons() << mbOK << mbCancel , 1) == 2)
	{
		// нажата кнопка "Отмена"
		return false;
	}
	else
	{
		TWork *del;
		int size = vKHRList[khr]->Works.size();
		if(work >= 0)
		{
			// удаление работы
			if ((size > work))
			{
				del = vKHRList[khr]->Works[work];
				Model->delWork(vKHRList[khr],del);
			}
			else if ((size <= work))
			{
				del = vKHRList[khr]->Payments[work-size];
				Model->delPay(vKHRList[khr],del);
			}
		}
		DisplayManager->showWorks(vKHRList);
		return true;
	}

}
开发者ID:Tidusnik,项目名称:KHReditor,代码行数:32,代码来源:Controller.cpp


示例10: delKHR

// удаление файла КХР из проекта
bool TController::delKHR(int num)
{
	TKHR* del = vKHRList[num];	// ссылка на удаляемую КХР
	// вывести сообщение о подтверждении
	if(MessageDlg("Удалить выбранную КХР из проекта?",
					mtWarning, TMsgDlgButtons() << mbOK << mbCancel , 1) == 2)
	{
		// нажата кнопка "Отмена"
		return false;
	}
	else
	{
		vector <TKHR*> :: iterator it;
		for(it= vKHRList.begin(); it < vKHRList.end(); it++)
		{
			TKHR *khr = *it;
			if(khr == del)
			{
				vKHRList.erase(it);   // удаление из списка
				saveSettings();		  // сохранение настроек
				DisplayManager->ShowKHR(vKHRList);
				break;
			}
		}
        ShowMessage("КХР удалена из проекта.");
		return true;
	}
}
开发者ID:Tidusnik,项目名称:KHReditor,代码行数:29,代码来源:Controller.cpp


示例11: Printer

/*
 =======================================================================================================================
 =======================================================================================================================
 */
void __fastcall TFormR::ImprimirVClick(TObject *Sender)
{
	/*~~~~~~~~~~~~~~~~~~~~~~~*/
	TPrinter	*I = Printer();
	/*~~~~~~~~~~~~~~~~~~~~~~~*/

	Graphics::TBitmap * bmp = new Graphics::TBitmap();
	bmp = FormR->Image1->Picture->Bitmap;

	// Impresion en vertical.
	I->Orientation = poPortrait;
	bmp->Width = tamanioCircuito.x;
	bmp->Height = tamanioCircuito.y;

	/*~~~~~~~*/
	TRect	rc;
	/*~~~~~~~*/

	rc.Left = 0;
	rc.Top = 0;

	/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
	double	proporcionI = (double) ((double) I->PageHeight / (double) I->PageWidth);
	double	factor = 2.3;
	/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

	rc.Right = (int) ((double) bmp->Width * (double) proporcionI * factor);
	rc.Bottom = (int) ((double) bmp->Height * (double) proporcionI * factor);

	/*~~~~~~~~~~~~~~~~~~~~*/
	bool	imprimir = true;
	/*~~~~~~~~~~~~~~~~~~~~*/

	if(rc.Right >= I->PageWidth || rc.Bottom >= I->PageHeight)
	{
		/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
		AnsiString	m = ANSIMENSAJE(msgVisuCircuitoErrorImprimir);
		/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

		if(MessageDlg(m, mtError, TMsgDlgButtons() << mbYes << mbNo, 0) == mrYes)
		{
			while(rc.Right >= I->PageWidth || rc.Bottom >= I->PageHeight)
			{
				factor -= 0.1;
				rc.Right = (int) ((double) bmp->Width * (double) proporcionI * factor);
				rc.Bottom = (int) ((double) bmp->Height * (double) proporcionI * factor);
			}	// end-while
			imprimir = true;
		}
		else
			imprimir = false;
	}			// end-if

	if(imprimir == true)
	{
		I->BeginDoc();
		I->Canvas->StretchDraw(rc, bmp);
		I->EndDoc();
	}			// end-if
}
开发者ID:zstars,项目名称:booledeusto,代码行数:64,代码来源:V_Circuito.cpp


示例12: if

// перемещает фишку из клетки, в которой сделан щелчок
// в свободную клетку
void __fastcall TForm1::Move(int cx, int cy)
{
    if  ( ( abs(cx - ex) == 1  &&  cy-ey == 0  ) ||
          ( abs(cy - ey) == 1  &&  cx-ex == 0  ) )
    {
        // переместить фишку из (cx,cy) в (ex,ey)
        pole[ey][ex] = pole[cy][cx];
        pole[cy][cx] = 16;
        ex = cx;
        ey = cy;
        // отрисовать поле
        ShowPole();
        if ( Finish () )
        {
            GameOver = true;
            ShowPole();
            int r = MessageDlg ("Цель достигнута! Еще раз (другая картинка)?",
                                mtInformation, TMsgDlgButtons() << mbYes << mbNo, 0);
            if ( r == mrNo )
                Form1->Close(); // завершить работу программы
            else
            {
                NewGame();
                ShowPole();
            }
        }
    }
}
开发者ID:teadrinker95,项目名称:khai,代码行数:30,代码来源:PuzMain.cpp


示例13: Randomize

//---------------------------------------------------------------------------
void __fastcall TMainForm::AddPhoto(AnsiString existingFileName)
{
	AnsiString photoFile = "";
    AnsiString hash = "";
	if (existingFileName.IsEmpty()) {
		Randomize();
		hash = GetMD5Hash(AnsiString(Random(99999999999999999999999999999999)));
		photoFile = GetAppPath()+"Photo\\"+hash+".jpg";
	} else {
		hash = existingFileName;
	}
    photoFile = GetAppPath()+"Photo\\"+hash+".jpg";

	if (OpenPictureDialog->Execute()) {
		if (!OpenPictureDialog->FileName.IsEmpty()) {
			if (FileExists(OpenPictureDialog->FileName)) {
				int ID = DBGrid->Fields[14]->AsInteger;
				AnsiString query = "UPDATE tblMembers SET mPhoto = '" + hash + "' WHERE ID = " + AnsiString(ID);
				CMData->ADOQuery->SQL->Clear();
				CMData->ADOQuery->SQL->Add(query);
				CMData->ADOQuery->ExecSQL();
				query = AnsiString("select mSur, mName, mPat, mBD, mCD, mNat, mAdd, mTel, mFam, mPro, ") +
					AnsiString ("mLife, mSug, mEtc, mPhoto, ID from tblMembers order by mSur, mName, mPat");
				CMData->ADOQuery->SQL->Clear();
				CMData->ADOQuery->SQL->Add(query);
				CMData->ADOQuery->Open();
				CopyFile(OpenPictureDialog->FileName.c_str(), photoFile.c_str(), false);
			} else {
				MessageDlg("Файл '" + OpenPictureDialog->FileName + "' не найден!", mtError, TMsgDlgButtons() << mbOK, 0);
			}
		}
	}
}
开发者ID:rkazakov,项目名称:ChurchManager,代码行数:34,代码来源:MainFrm.cpp


示例14: TMsgDlgButtons

void __fastcall TFrmAlarmDetailList::BtnDecrease100Click(TObject *Sender)
{           
	INT nPlusVal = dynamic_cast<TButton *>(Sender)->Tag;

	INT nAlarmCode = lblAlarmCode->Caption.ToInt() - nPlusVal;
    if( nAlarmCode < 1 )
    {
    	nAlarmCode = 1;
    }

    if( bSaveChkFlag == TRUE )
    {
        if ( MessageDlg("알람 내용의 수정이 있습니다.\nSave 없이 진행하시겠습니까?\n\nOK"
							" : 에러코드 변경\nCancel : 코드 변경 취소"
                            , mtWarning, TMsgDlgButtons() << mbOK<<mbCancel, 0 ) == mrOk )
        {
        	ReadErrorDatas( nAlarmCode );
			lblAlarmCode->Caption = nAlarmCode;
			lblErrRecordNo->Caption = nAlarmCode;
		}
		else
		{
			lblAlarmCode->Caption = lblAlarmCode->Caption.ToInt();
			lblErrRecordNo->Caption = lblAlarmCode->Caption.ToInt();
		}
    }
    else
    {
    	ReadErrorDatas( nAlarmCode );
		lblAlarmCode->Caption = nAlarmCode;
		lblErrRecordNo->Caption = nAlarmCode;
    }

    bSaveChkFlag = FALSE;   
}
开发者ID:japgo,项目名称:mygithub,代码行数:35,代码来源:AlarmDetailScrn.cpp


示例15: ButtonSalirClick

//---------------------------------------------------------------------------
void __fastcall TFormClasificacion::ButtonSalirClick(TObject *Sender)
{
if (MessageDlg("Se va a cerrar la aplicacion. Los cambios no guardados se perderán. ¿Desea continuar?",mtConfirmation,TMsgDlgButtons()<<mbYes<<mbNo,0)==mrYes)
        {
        Close();
        }
}
开发者ID:carlosrd,项目名称:LP2,代码行数:8,代码来源:UFormClasificacion.cpp


示例16: ServerModeDataSourceFatalError

//---------------------------------------------------------------------------
void __fastcall TServerModeDemoDataDM::ServerModeDataSourceFatalError(TdxServerModeCustomDataSource *Sender, const String AMessage)
{
  String S = "The following error occurred when obtaining data: \"" + AMessage + "\".\n";
  S += "Do you want to reload the data?";
  if (MessageDlg(S, mtError, TMsgDlgButtons() << mbYes << mbNo, 0) == mrYes)
	Sender->Open();
}
开发者ID:chinnyannieb,项目名称:Meus-Projetos,代码行数:8,代码来源:ServerModeDemoData.cpp


示例17: list

/*
	Add another student to the list (allocate from object allocator).
	If dump is true, redisplay the lists. Returns true, if successful.
*/
bool TfrmObjAllocMain::AddStudent(bool dump)
{
	PStudent ps;
	try
	{
		ps = (PStudent)reinterpret_cast<PStudent>(FStudentObjectMgr->Allocate());
	}
	catch (const OAException& e)
	{
		MessageDlg(AnsiString("Exception caught!\n\n") +  e.what(), mtError, TMsgDlgButtons() << mbOK, 0);
		return false;
	}

	FStudentCount++;

		// Initializing data?
	if (chkInitializeData->Checked)
		FillStudent(ps);

		// Add the student and adjust UI counters
	FStudents->Add(ps);
	UpdateUI();

		// Redisplay memory
	if (dump)
	{
		DumpStudents();
		DumpFreeList();
		DumpMemory();
	}
	return true;
}
开发者ID:gamezatwork,项目名称:personal,代码行数:36,代码来源:ObjAllocMain.cpp


示例18: StrToInt

void __fastcall TLog::MemFromExit(TObject *Sender)
{
  AnsiString str = "0x";
  int addr = StrToInt(str + MemFrom->EditText);
  if (addr < 0 || addr >= MEMSIZE)   // if invalid address
    MessageDlg("Invalid Address", mtInformation, TMsgDlgButtons() << mbOK, 0);
}
开发者ID:fduhia,项目名称:Easy68k,代码行数:7,代码来源:logU.cpp


示例19: RemoveSelItems

void TItemList::RemoveSelItems(TOnItemRemove on_remove)
{
	if (mrYes==MessageDlg("Remove selected item(s)?", mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0)){
        on_remove 	= on_remove.empty()?OnItemRemoveEvent:on_remove;
        VERIFY		(!on_remove.empty());
        RStringVec sel_items;
        if (GetSelected(sel_items)){
            tvItems->IsUpdating = true; // LockUpdating нельзя
            DeselectAll					();
            tvItemsAfterSelectionChange	(0);
            bool bSelChanged=false;
            bool bRes=false;
            for (RStringVecIt it=sel_items.begin(); it!=sel_items.end(); it++){
                TElTreeItem* pNode	= FHelper.FindItem(tvItems,**it);
                if (!FHelper.RemoveItem(tvItems,pNode,on_remove.empty()?OnItemRemoveEvent:on_remove)){
                    SelectItem(**it,true,true,false);
                    bSelChanged=true;
                }else{
                    bRes = true;
                }
            }
            if (bSelChanged||bRes){
                tvItemsAfterSelectionChange	(0);
                if (bRes&&!OnModifiedEvent.empty())	OnModifiedEvent(); 
            }
            tvItems->IsUpdating 		= false;
        }
    }
}
开发者ID:NeoAnomaly,项目名称:xray,代码行数:29,代码来源:ItemList.cpp


示例20: catch

//---------------------------------------------------------------------------
void __fastcall TFormArnAction::SpeedButton4Click(TObject *Sender)
{
	if (!DM->FIBTransactionUpdate->InTransaction) DM->FIBTransactionUpdate->StartTransaction();
	DM->FIBStoredProc_VEHICLE_PAY->ParamByName("VI_UNIQV")->AsInteger=DM->FIBDataSetVehicles->FieldValues["UNIQV"];
	DM->FIBStoredProc_VEHICLE_PAY->ParamByName("VI_ARN_ACTION")->AsShort=DBLookupComboboxEh_SMN_ACTION->KeyValue;
	DM->FIBStoredProc_VEHICLE_PAY->ParamByName("VI_SMN_START")->AsInteger=DM->FIBDataSetSmena->FieldValues["UNIQS"];
	DM->FIBStoredProc_VEHICLE_PAY->ParamByName("VI_ARN_DATE")->AsDate=DateTimePickerArendaDate->Date;
	if(EditMoney->Text.Length())
		DM->FIBStoredProc_VEHICLE_PAY->ParamByName("VI_MONEY")->AsDouble=EditMoney->Text.ToDouble();
	else
		DM->FIBStoredProc_VEHICLE_PAY->ParamByName("VI_MONEY")->Clear();
	if(EditArnInfo->Text.Length()) DM->FIBStoredProc_VEHICLE_PAY->ParamByName("VI_INFO")->AsString=EditArnInfo->Text;
	else DM->FIBStoredProc_VEHICLE_PAY->ParamByName("VI_INFO")->Clear();
	
	try{
		DM->FIBStoredProc_VEHICLE_PAY->ExecProc();
		DM->FIBTransactionUpdate->Commit();
		}
	catch(...){
		DM->FIBTransactionUpdate->Rollback();
		MessageDlg("Что-то не добавляется...", mtError, TMsgDlgButtons() << mbOK, 0);
		}
		DM->FIBDataSetArenda->CloseOpen(true);
		DM->FIBDataSetVehicles->RecordModified(true);
		DM->FIBDataSetVehicles->Refresh();
}
开发者ID:1balaji,项目名称:taxi-14,代码行数:27,代码来源:UnitArnAction.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MessageEnd函数代码示例发布时间:2022-05-30
下一篇:
C++ MessageBoxX函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap