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

C++ MessageBoxX函数代码示例

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

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



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

示例1: MessageBoxX

bool
dlgTaskManager::CommitTaskChanges()
{
  if (!task_modified)
    return true;

  task_modified |= active_task->get_factory().CheckAddFinish();

  if (!active_task->task_size() || active_task->check_task()) {

    { // this must be done in thread lock because it potentially changes the
      // waypoints database
      ScopeSuspendAllThreads suspend;
      active_task->check_duplicate_waypoints(way_points);
    }

    protected_task_manager->task_commit(*active_task);
    protected_task_manager->task_save_default();

    task_modified = false;
    return true;
  }

  MessageBoxX(getTaskValidationErrors(
    active_task->get_factory().getValidationErrors()),
    _("Validation Errors"), MB_ICONEXCLAMATION);

  return (MessageBoxX(_("Task not valid. Changes will be lost.\nContinue?"),
                      _("Task Manager"), MB_YESNO | MB_ICONQUESTION) == IDYES);
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:30,代码来源:dlgTaskManager.cpp


示例2: OnRemoveFromTaskClicked

static void
OnRemoveFromTaskClicked(gcc_unused WndButton &button)
{
  if (protected_task_manager == NULL)
    return;

  switch (remove_from_task(*selected_waypoint)) {
  case SUCCESS:
    protected_task_manager->task_save_default();
    wf->SetModalResult(mrOK);
    break;
  case NOTASK:
    MessageBoxX(_("No task defined."), _("Error"),
                MB_OK | MB_ICONEXCLAMATION);
    break;
  case UNMODIFIED:
    MessageBoxX(_("Waypoint not in task."), _("Remove from task"),
                MB_OK | MB_ICONINFORMATION);
    break;

  case INVALID:
    MessageBoxX(_("Task would not be valid after the change."), _("Error"),
                MB_OK | MB_ICONEXCLAMATION);
    break;
  }
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:26,代码来源:dlgWayPointDetails.cpp


示例3: OnDeleteClicked

static void OnDeleteClicked(WndButton* pWnd){

  TCHAR file_name[MAX_PATH];

  WndProperty* wp;
  DataFieldFileReader *dfe;

  wp = (WndProperty*)wf->FindByName(TEXT("prpFile"));
  if (!wp) return;

  wp->OnLButtonDown((POINT){0,0});

  dfe = (DataFieldFileReader*) wp->GetDataField();

  int file_index = dfe->GetAsInteger();
  if (file_index>0) {
	_stprintf(file_name, TEXT("%s '%s' ?"), MsgToken(1789), dfe->GetAsString()); // Delete task file?
	if(MessageBoxX(file_name, _T(" "), mbYesNo) == IdNo) {
		return;
	}
  } else {
	MessageBoxX(MsgToken(1790),_T(" "), mbOk); // No task file to delete
	return;
  }

  if (file_index>0) {
    lk::filesystem::deleteFile(dfe->GetPathFile());
    // Cannot update dfe list, so we force exit.
    ItemIndex = -1; 
    wf->SetModalResult(mrOK);
    return;
  }
}
开发者ID:SergioDaSilva82,项目名称:LK8000,代码行数:33,代码来源:dlgTaskOverview.cpp


示例4: OnDeleteClicked

static void OnDeleteClicked(WindowControl * Sender, WndListFrame::ListInfo_t *ListInfo){
  (void)ListInfo; (void)Sender;

  TCHAR file_name[MAX_PATH];

  WndProperty* wp;
  DataFieldFileReader *dfe;

  wp = (WndProperty*)wf->FindByName(TEXT("prpFile"));
  if (!wp) return;

  HWND hwnd = wp->GetHandle();
  SendMessage(hwnd,WM_LBUTTONDOWN,0,0);
  dfe = (DataFieldFileReader*) wp->GetDataField();

  int file_index = dfe->GetAsInteger();
  if (file_index>0) {
	_stprintf(file_name, TEXT("%s '%s' ?"), MsgToken(1789), dfe->GetAsString()); // Delete task file?
	if(MessageBoxX(hWndMapWindow, file_name, _T(" "), MB_YESNO|MB_ICONQUESTION) == IDNO) {
		return;
	}
  } else {
	MessageBoxX(hWndMapWindow, MsgToken(1790),_T(" "), MB_OK|MB_ICONEXCLAMATION); // No task file to delete
	return;
  }

  if (file_index>0) {
    DeleteFile(dfe->GetPathFile());
    // Cannot update dfe list, so we force exit.
    ItemIndex = -1; 
    wf->SetModalResult(mrOK);
    return;
  }
}
开发者ID:eonezhang,项目名称:LK8000,代码行数:34,代码来源:dlgTaskOverview.cpp


示例5: guiStopLogger

void
LoggerImpl::guiStartLogger(const NMEA_INFO& gps_info,
                       const SETTINGS_COMPUTER& settings,
                       bool noAsk) {
  int i;
  if (!LoggerActive) {
    if (gps_info.Replay) {
      if (LoggerActive)
        guiStopLogger(gps_info, true);
      return;
    }
    TCHAR TaskMessage[1024];
    _tcscpy(TaskMessage,TEXT("Start Logger With Declaration\r\n"));
    if (task.Valid()) {
      for (i = 0; task.ValidTaskPoint(i); i++) {
        _tcscat(TaskMessage, task.getWaypoint(i).Name);
	_tcscat(TaskMessage,TEXT("\r\n"));
      }
    } else {
      _tcscat(TaskMessage,TEXT("None"));
    }

    if(noAsk ||
       (MessageBoxX(TaskMessage,gettext(TEXT("Start Logger")),
		    MB_YESNO|MB_ICONQUESTION) == IDYES))
      {

	if (LoggerClearFreeSpace(gps_info)) {

	  StartLogger(gps_info, settings, strAssetNumber);
	  LoggerHeader(gps_info);
	  LoggerActive = true; // start logger after Header is completed.  Concurrency

          if (task.Valid()) {
            int ntp = task.getFinalWaypoint();
            StartDeclaration(gps_info,ntp);
            for (i = 0; task.ValidTaskPoint(i); i++) {
              const WAYPOINT &way_point = task.getWaypoint(i);
              AddDeclaration(way_point.Location.Latitude,
                             way_point.Location.Longitude,
                             way_point.Name);
            }
            EndDeclaration();
          }
	  ResetFRecord(); // reset timer & lastRecord string so if
			  // logger is restarted, FRec appears at top
			  // of file
	} else {

	  MessageBoxX(
		      gettext(TEXT("Logger inactive, insufficient storage!")),
		      gettext(TEXT("Logger Error")), MB_OK| MB_ICONERROR);
	  StartupStore(TEXT("Logger not started: Insufficient Storage\r\n"));
	}
      }
  }
}
开发者ID:scottp,项目名称:xcsoar,代码行数:57,代码来源:LoggerImpl.cpp


示例6: OnLoadClicked

static void OnLoadClicked(WndButton* pWnd){ // 091216
  TCHAR file_name[MAX_PATH];

  WndProperty* wp;
  DataFieldFileReader *dfe;

  wp = (WndProperty*)wf->FindByName(TEXT("prpFile"));
  if (!wp) return;

  wp->OnLButtonDown((POINT){0,0});
  
  dfe = (DataFieldFileReader*) wp->GetDataField();

  int file_index = dfe->GetAsInteger();
  if (file_index>0) {
	if (ValidTaskPoint(ActiveWayPoint) && ValidTaskPoint(1)) {
		_stprintf(file_name, TEXT("%s '%s' ?"), gettext(TEXT("[email protected]_")), dfe->GetAsString()); // Clear old task and load
		if(MessageBoxX(file_name, _T(" "), mbYesNo) == IdNo) {
			return;
		}
	}
  } else {
	// LKTOKEN  [email protected]_ = "No Task to load" 
	MessageBoxX(gettext(TEXT("[email protected]_")),_T(" "), mbOk);
	return;
  }

  if (file_index>0) {
      LPCTSTR szFileName = dfe->GetPathFile();
      LPCTSTR wextension = _tcsrchr(szFileName, _T('.'));
      if(wextension) {
          bool bOK = false;
          if(_tcsicmp(wextension,_T(LKS_TSK))==0) {
              CTaskFileHelper helper;
              bOK = helper.Load(szFileName);
          } 
#ifdef OLDTASK_COMPAT
          else if (_tcsicmp(wextension,_T(LKS_OLD_TSK))==0) {
              LoadNewTask(szFileName);
              bOK = true;
          } 
#endif          
          else if (_tcsicmp(wextension,_T(LKS_WP_CUP))==0) {
              bOK = LoadCupTask(szFileName);
          } else if (_tcsicmp(wextension,_T(LKS_WP_GPX))==0) {
              bOK = LoadGpxTask(szFileName);
          }
          if(!bOK) {
              MessageBoxX(gettext(TEXT("[email protected]_")),_T(" "), mbOk);
              return;
          }
          OverviewRefreshTask();
          UpdateFilePointer();
          UpdateCaption();
      }
  }
}
开发者ID:SergioDaSilva82,项目名称:LK8000,代码行数:57,代码来源:dlgTaskOverview.cpp


示例7: GrowWaypointList

WAYPOINT* GrowWaypointList() {
  // memory allocation
  if (!AllocateWaypointList()) {
    return 0;
  }

  if (((NumberOfWayPoints+1) % 50) == 0) {
    WAYPOINT *p;
    
    if ((p = 
         (WAYPOINT *)LocalReAlloc(WayPointList, 
                                  (((NumberOfWayPoints+1)/50)+1) 
                                  * 50 * sizeof(WAYPOINT), 
                                  LMEM_MOVEABLE | LMEM_ZEROINIT)) == NULL){
      
	StartupStore(_T("+++ GrowWaypointList FAILED!%s"),NEWLINE);
      MessageBoxX(hWndMainWindow,
	// LKTOKEN  [email protected]_ = "Not Enough Memory For Waypoints" 
                  gettext(TEXT("[email protected]_")),
	// LKTOKEN  [email protected]_ = "Error" 
                  gettext(TEXT("[email protected]_")),MB_OK|MB_ICONSTOP);
      
      return 0; // failed to allocate
    }
    
    if (p != WayPointList){
      WayPointList = p;      
    }

    WPCALC *q;
    
    if ((q = 
         (WPCALC *)LocalReAlloc(WayPointCalc, 
                                  (((NumberOfWayPoints+1)/50)+1) 
                                  * 50 * sizeof(WPCALC), 
                                  LMEM_MOVEABLE | LMEM_ZEROINIT)) == NULL){
      
	StartupStore(_T("+++ GrowWaypointCalc FAILED!%s"),NEWLINE);
      MessageBoxX(hWndMainWindow,
	// LKTOKEN  [email protected]_ = "Not Enough Memory For Waypoints" 
                  gettext(TEXT("[email protected]_")),
	// LKTOKEN  [email protected]_ = "Error" 
                  gettext(TEXT("[email protected]_")),MB_OK|MB_ICONSTOP);
      
      return 0; // failed to allocate
    }
    
    if (q != WayPointCalc){
      WayPointCalc = q;      
    }
  }

  NumberOfWayPoints++;
  return WayPointList + NumberOfWayPoints-1;
  // returns the newly created waypoint
}
开发者ID:Acrobot,项目名称:LK8000,代码行数:56,代码来源:GrowWaypointList.cpp


示例8: OnLoadClicked

static void OnLoadClicked(WindowControl * Sender, WndListFrame::ListInfo_t *ListInfo){ // 091216
  (void)ListInfo; (void)Sender;

  TCHAR file_name[MAX_PATH];

  WndProperty* wp;
  DataFieldFileReader *dfe;

  wp = (WndProperty*)wf->FindByName(TEXT("prpFile"));
  if (!wp) return;

  HWND hwnd = wp->GetHandle();
  SendMessage(hwnd,WM_LBUTTONDOWN,0,0);
  dfe = (DataFieldFileReader*) wp->GetDataField();

  int file_index = dfe->GetAsInteger();
  if (file_index>0) {
	if (ValidTaskPoint(ActiveWayPoint) && ValidTaskPoint(1)) {
		_stprintf(file_name, TEXT("%s '%s' ?"), gettext(TEXT("[email protected]_")), dfe->GetAsString()); // Clear old task and load
		if(MessageBoxX(hWndMapWindow, file_name, _T(" "), MB_YESNO|MB_ICONQUESTION) == IDNO) {
			return;
		}
	}
  } else {
	// LKTOKEN  [email protected]_ = "No Task to load" 
	MessageBoxX(hWndMapWindow, gettext(TEXT("[email protected]_")),_T(" "), MB_OK|MB_ICONEXCLAMATION);
	return;
  }

  if (file_index>0) {
      LPCTSTR szFileName = dfe->GetPathFile();
      LPCTSTR wextension = _tcsrchr(szFileName, _T('.'));
      if(wextension) {
          bool bOK = false;
          if(_tcsicmp(wextension,_T(LKS_TSK))==0) {
              CTaskFileHelper helper;
              bOK = helper.Load(szFileName);
          } else if (_tcsicmp(wextension,_T(LKS_OLD_TSK))==0) {
              LoadNewTask(szFileName);
              bOK = true;
          } else if (_tcsicmp(wextension,_T(LKS_WP_CUP))==0) {
              bOK = LoadCupTask(szFileName);
          } else if (_tcsicmp(wextension,_T(LKS_WP_GPX))==0) {
              bOK = LoadGpxTask(szFileName);
          }
          if(!bOK) {
              MessageBoxX(hWndMapWindow, gettext(TEXT("[email protected]_")),_T(" "), MB_OK|MB_ICONEXCLAMATION);
              return;
          }
          OverviewRefreshTask();
          UpdateFilePointer();
          UpdateCaption();
      }
  }
}
开发者ID:IvanSantanna,项目名称:LK8000,代码行数:55,代码来源:dlgTaskOverview.cpp


示例9: OnSaveClicked

static void
OnSaveClicked(WndButton &Sender)
{
  (void)Sender;
  if (!ordered_task->check_task()) {
    MessageBoxX (_("Task invalid.  Not saved."),
                 _T("Task Edit"), MB_OK);
    return;
  }

  if (OrderedTaskSave(*ordered_task, true)) {
    MessageBoxX (_("Task saved"),
                 _T("Task Edit"), MB_OK);
  }
}
开发者ID:galippi,项目名称:xcsoar,代码行数:15,代码来源:dlgTaskManager.cpp


示例10: OnTeamClicked

/**
 * This event handler is called when the "Team" button is pressed
 */
static void
OnTeamClicked(gcc_unused WndButton &Sender)
{
  // Ask for confirmation
  if (MessageBoxX(_T("Do you want to set this FLARM contact as your ")
      _T("new teammate?"), _T("New Teammate"), MB_YESNO) != IDYES)
    return;

  SETTINGS_TEAMCODE &settings = CommonInterface::SetSettingsComputer();

  // Set the Teammate callsign
  const TCHAR *callsign = FlarmDetails::LookupCallsign(target_id);
  if (callsign == NULL || string_is_empty(callsign)) {
    settings.TeamFlarmCNTarget.clear();
  } else {
    // copy the 3 first chars from the name
    settings.TeamFlarmCNTarget = callsign;
  }

  // Start tracking
  settings.TeamFlarmIdTarget = target_id;
  settings.TeamFlarmTracking = true;
  settings.TeammateCodeValid = false;

  // Close the dialog
  wf->SetModalResult(mrOK);
}
开发者ID:macsux,项目名称:XCSoar,代码行数:30,代码来源:dlgFlarmTrafficDetails.cpp


示例11: OnFlarmLockClicked

static void
OnFlarmLockClicked(gcc_unused WndButton &button)
{
  TCHAR newTeamFlarmCNTarget[4];
  _tcsncpy(newTeamFlarmCNTarget,
           XCSoarInterface::SetSettingsComputer().TeamFlarmCNTarget, 4);

  if (!dlgTextEntryShowModal(newTeamFlarmCNTarget, 4))
    return;

  _tcsncpy(XCSoarInterface::SetSettingsComputer().TeamFlarmCNTarget,
           newTeamFlarmCNTarget, 4);
  XCSoarInterface::SetSettingsComputer().TeammateCodeValid = false;

  if (string_is_empty(XCSoarInterface::SettingsComputer().TeamFlarmCNTarget)) {
    XCSoarInterface::SetSettingsComputer().TeamFlarmTracking = false;
    XCSoarInterface::SetSettingsComputer().TeamFlarmIdTarget.clear();
    return;
  }

  FlarmId flarmId = FlarmDetails::LookupId(
      XCSoarInterface::SettingsComputer().TeamFlarmCNTarget);

  if (!flarmId.defined()) {
    MessageBoxX(_("Unknown Competition Number"),
                _("Not Found"), MB_OK | MB_ICONINFORMATION);

    XCSoarInterface::SetSettingsComputer().TeamFlarmTracking = false;
    XCSoarInterface::SetSettingsComputer().TeamFlarmIdTarget.clear();
    XCSoarInterface::SetSettingsComputer().TeamFlarmCNTarget[0] = 0;
  } else {
    XCSoarInterface::SetSettingsComputer().TeamFlarmIdTarget = flarmId;
    XCSoarInterface::SetSettingsComputer().TeamFlarmTracking = true;
  }
}
开发者ID:hnpilot,项目名称:XCSoar,代码行数:35,代码来源:dlgTeamCode.cpp


示例12: dlgVoiceShowModal

void dlgVoiceShowModal(void){
  wf = dlgLoadFromXML(CallBackTable,
                      _T("dlgVoice.xml"),
		      XCSoarInterface::main_window,
		      _T("IDR_XML_VOICE"));

  
  if (!wf) return;

  LoadIntoForm(*wf, XCSoarInterface::SettingsComputer());

  wf->ShowModal();

  bool changed = false;

  changed = SaveFromForm(*wf, XCSoarInterface::SetSettingsComputer());
  
  if (changed) {
    Profile::StoreRegistry();

    MessageBoxX(gettext(_T("Changes to configuration saved.")),
		 _T(""), MB_OK);
  }
    
  delete wf;
  wf = NULL;

}
开发者ID:bugburner,项目名称:xcsoar,代码行数:28,代码来源:dlgVoice.cpp


示例13: OnSaveClicked

static void OnSaveClicked(WndButton* pWnd){

  int file_index;
  TCHAR task_name[MAX_PATH];
  WndProperty* wp;
  DataFieldFileReader *dfe;

  wp = (WndProperty*)wf->FindByName(TEXT("prpFile"));
  if (!wp) return;
  dfe = (DataFieldFileReader*)wp->GetDataField();

  file_index = dfe->GetAsInteger();

  // TODO enhancement: suggest a good new name not already in the list
  _tcscpy(task_name,TEXT("NEW"));
  dlgTextEntryShowModal(task_name, 10); // max length

  if (_tcslen(task_name)>0) {

	_tcscat(task_name, TEXT(LKS_TSK));

	dfe->Lookup(task_name);
	file_index = dfe->GetAsInteger();

	if (file_index==0) {
		// good, this file is unique..
		dfe->addFile(task_name, task_name);
		dfe->Lookup(task_name);
		wp->RefreshDisplay();
	}

  } else {
	// TODO code: report error, task not saved since no name was given
	return;
  }

  if (file_index>0) {
	// file already exists! ask if want to overwrite
        TCHAR sTmp[500];
	_sntprintf(sTmp, array_size(sTmp), TEXT("%s: '%s'"),
	// LKTOKEN  [email protected]_ = "Task file already exists"
		MsgToken(696),
		dfe->GetAsString());

		if(MessageBoxX(
			sTmp,
			// LKTOKEN  [email protected]_ = "Overwrite?"
			MsgToken(510),
			mbYesNo) != IdYes) {

			return;
		}
  }

  TCHAR file_name[MAX_PATH];
  LocalPath(file_name,TEXT(LKD_TASKS), task_name);

  SaveTask(file_name);
  UpdateCaption();
}
开发者ID:lshachar,项目名称:LK8000,代码行数:60,代码来源:dlgTaskOverview.cpp


示例14: OnFlarmLockClicked

static void OnFlarmLockClicked(WindowControl * Sender)
{
  (void)Sender;

  dlgTextEntryShowModal(XCSoarInterface::SetSettingsComputer().TeamFlarmCNTarget, 4);

  XCSoarInterface::SetSettingsComputer().TeammateCodeValid = false;

  int flarmId = LookupFLARMDetails(XCSoarInterface::SettingsComputer().TeamFlarmCNTarget);

  if (flarmId == 0)
    {
      MessageBoxX(gettext(TEXT("Unknown Competition Number")),
		  gettext(TEXT("Not Found")),
		  MB_OK|MB_ICONINFORMATION);

      XCSoarInterface::SetSettingsComputer().TeamFlarmTracking = false;
      XCSoarInterface::SetSettingsComputer().TeamFlarmIdTarget = 0;
      XCSoarInterface::SetSettingsComputer().TeamFlarmCNTarget[0] = 0;
    }
  else
    {
      XCSoarInterface::SetSettingsComputer().TeamFlarmIdTarget = flarmId;
      XCSoarInterface::SetSettingsComputer().TeamFlarmTracking = true;
    }
}
开发者ID:scottp,项目名称:xcsoar,代码行数:26,代码来源:dlgTeamCode.cpp


示例15: GetRegistryString

void
LoggerImpl::LoggerDeviceDeclare() {
  bool found_logger = false;
  Declaration_t Decl;
  int i;

  GetRegistryString(szRegistryPilotName, Decl.PilotName, 64);
  GetRegistryString(szRegistryAircraftType, Decl.AircraftType, 32);
  GetRegistryString(szRegistryAircraftRego, Decl.AircraftRego, 32);

  for (i = 0; task.ValidTaskPoint(i); i++) {
    Decl.waypoint[i] = &task.getWaypoint(i);
  }
  Decl.num_waypoints = i;

  DeclaredToDevice = false;

  if (LoggerDeclare(devA(), &Decl))
    found_logger = true;

  if (LoggerDeclare(devB(), &Decl))
    found_logger = true;

  if (!found_logger) {
    MessageBoxX(gettext(TEXT("No logger connected")),
		devB()->Name, MB_OK| MB_ICONINFORMATION);
    DeclaredToDevice = true; // testing only
  }

}
开发者ID:scottp,项目名称:xcsoar,代码行数:30,代码来源:LoggerImpl.cpp


示例16: GotoWaypoint

void GotoWaypoint(const int wpnum) {
  if (!ValidWayPoint(wpnum)) {
	DoStatusMessage(_T("ERR-639 INVALID GOTO WPT"));
	return;
  }
  if (ValidTaskPoint(ActiveWayPoint) && ValidTaskPoint(1)) {
	TCHAR wpname[NAME_SIZE+1];
	_tcscpy(wpname,WayPointList[wpnum].Name);
	wpname[10] = '\0';

	if (MessageBoxX(
	// LKTOKEN  [email protected]_ = "CONFIRM GOTO, ABORTING TASK?" 
	gettext(TEXT("[email protected]_")),
	// LKTOKEN  [email protected]_ = "A task is running!" 
	gettext(TEXT("[email protected]_")),
	mbYesNo) == IdYes) {
		LockTaskData();
		FlyDirectTo(wpnum);
		OvertargetMode=OVT_TASK;
		UnlockTaskData();
        }
  } else {
	LockTaskData();
	FlyDirectTo(wpnum);
	OvertargetMode=OVT_TASK;
	UnlockTaskData();
  }
}
开发者ID:acasadoalonso,项目名称:LK8000,代码行数:28,代码来源:LKUtils.cpp


示例17: OnCloseClicked

static void OnCloseClicked(WndButton* pWnd){
  if(pWnd) {
    WndForm * pForm = pWnd->GetParentWndForm();
    bool bIdenti = false;
    getVariables();
    for (unsigned int i=0 ; i < NO_WP_FILES-1; i++)
    {
      if((szWaypointFile[i] != NULL) &&  (_tcslen (szWaypointFile[i])> 0))
      for (unsigned int j=(i+1) ; j < NO_WP_FILES; j++)
      {
        TCHAR tmp[MAX_PATH];
        if((szWaypointFile[j] != NULL) && (_tcslen (szWaypointFile[j])> 0))
        {
		  if(_tcscmp(szWaypointFile[i],szWaypointFile[j])==0)
		  {
		   _sntprintf(tmp, MAX_PATH, _T("%s %u %s %u %s!"), MsgToken(2340), // [email protected]_ "Waypoint Files"
														    i+1,
															MsgToken(2345) , //[email protected]_ "and"
															j+1,
															MsgToken(2346) //[email protected]_ "are identical"
														 );
		    MessageBoxX(  tmp, MsgToken(356),  mbOk) ;  // [email protected]_ "Information"
		    bIdenti = true;
		  }
        }
      }
    }
    if( bIdenti) return ;


    if(pForm) {
      pForm->SetModalResult(mrOK);
    }
  }
}
开发者ID:LK8000,项目名称:LK8000,代码行数:35,代码来源:dlgWaypointFiles.cpp


示例18: decl

void
Logger::guiStartLogger(const NMEA_INFO& gps_info,
                    const SETTINGS_COMPUTER& settings,
                       const ProtectedTaskManager &protected_task_manager,
                    bool noAsk)
{
  if (isLoggerActive() || gps_info.gps.Replay)
    return;

  OrderedTask* task = protected_task_manager.task_clone();
  Declaration decl(task);
  Profile::GetDeclarationConfig(decl, settings.plane);

  if (task) {
    delete task;

    if (!noAsk) {
      TCHAR TaskMessage[1024];
      _tcscpy(TaskMessage, _T("Start Logger With Declaration\r\n"));
      
      if (decl.size()) {
        for (unsigned i = 0; i< decl.size(); ++i) {
          _tcscat(TaskMessage, decl.get_name(i));
          _tcscat(TaskMessage, _T("\r\n"));
        }
      } else {
        _tcscat(TaskMessage, _T("None"));
      }
      
      if (MessageBoxX(TaskMessage, _("Start Logger"),
                      MB_YESNO | MB_ICONQUESTION) != IDYES)
        return;
    }
  }

  if (!LoggerClearFreeSpace(gps_info)) {
    MessageBoxX(_("Logger inactive, insufficient storage!"),
                _("Logger Error"), MB_OK| MB_ICONERROR);
    LogStartUp(_T("Logger not started: Insufficient Storage"));
    return;
  }

  Poco::ScopedRWLock protect(lock, true);
  _logger.StartLogger(gps_info, settings, strAssetNumber, decl);
}
开发者ID:joachimwieland,项目名称:xcsoar-jwieland,代码行数:45,代码来源:Logger.cpp


示例19: LoggerDeclare

static bool LoggerDeclare(PDeviceDescriptor_t dev, Declaration_t *decl)
{
  if (!devIsLogger(dev))
	return FALSE;

  // If a Flarm is reset while we are here, then it will come up with isFlarm set to false,
  // and task declaration will fail. The solution is to let devices have a flag for "HaveFlarm".
  LKDoNotResetComms=true;

  // LKTOKEN  [email protected]_ = "Declare Task?" 
  if (MessageBoxX(hWndMapWindow, gettext(TEXT("[email protected]_")), 
	dev->Name, MB_YESNO| MB_ICONQUESTION) == IDYES) {

	const unsigned ERROR_BUFFER_LEN = 64;
	TCHAR errorBuffer[ERROR_BUFFER_LEN] = { '\0' };

	if (devDeclare(dev, decl, ERROR_BUFFER_LEN, errorBuffer)) {
		// LKTOKEN  [email protected]_ = "Task Declared!" 
		MessageBoxX(hWndMapWindow, gettext(TEXT("[email protected]_")),
			dev->Name, MB_OK| MB_ICONINFORMATION);

		DeclaredToDevice = true;

	} else {

		TCHAR buffer[2*ERROR_BUFFER_LEN];

		if(errorBuffer[0] == '\0') {
			// LKTOKEN  [email protected]_ = "Unknown error" 
			_sntprintf(errorBuffer, ERROR_BUFFER_LEN, gettext(_T("[email protected]_")));
		} else {
			// do it just to be sure
			errorBuffer[ERROR_BUFFER_LEN - 1] = '\0';
		}

		// LKTOKEN  [email protected]_ = "Error! Task NOT declared!" 
		_sntprintf(buffer, 2*ERROR_BUFFER_LEN, _T("%s\n%s"), gettext(_T("[email protected]_")), errorBuffer);
		MessageBoxX(hWndMapWindow, buffer, dev->Name, MB_OK| MB_ICONERROR);
      
		DeclaredToDevice = false;
	}
  }
  LKDoNotResetComms=false;
  return TRUE;
}
开发者ID:Turbo87,项目名称:LK8000,代码行数:45,代码来源:Logger.cpp


示例20: SetPointType

static bool
SetPointType(AbstractTaskFactory::LegalPointType type)
{
  bool apply = false;

  if (!point) {
    apply = true;
    // empty point, don't ask confirmation
  } else {
    if (type == get_point_type())
      // no change
      return true;

    if (MessageBoxX(_("Change point type?"), _("Task Point"),
                    MB_YESNO | MB_ICONQUESTION) == IDYES)
      apply = true;
  }

  if (apply) {
    AbstractTaskFactory &factory = ordered_task->GetFactory();

    if (point) {
      point = factory.CreateMutatedPoint(*point, type);
      if (point == NULL)
        return false;

      if (factory.Replace(*point, active_index, true))
        task_modified = true;
      delete point;
    } else {
      if (factory.IsValidFinishType(type) &&
          ordered_task->get_ordered_task_behaviour().is_closed)
        way_point = &(ordered_task->get_tp(0)->GetWaypoint());
      else
        way_point =
          dlgWaypointSelect(wf->GetMainWindow(),
                              ordered_task->TaskSize() > 0 ?
                              ordered_task->get_tp(ordered_task->
                                  TaskSize() - 1)->GetLocation() :
                              XCSoarInterface::Basic().location);
      if (!way_point)
        return false;

      point = factory.CreatePoint(type, *way_point);
      if (point == NULL)
        return false;

      if (factory.Append(*point, true))
        task_modified = true;

      delete point;
    }
    return true;
  }
  return false;
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:56,代码来源:dlgTaskPointType.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ MessageDlg函数代码示例发布时间:2022-05-30
下一篇:
C++ MessageBoxW函数代码示例发布时间: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