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


C++ UpdateCaption函数代码示例

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


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

示例1: dlgConfigurationVarioShowModal

bool
dlgConfigurationVarioShowModal(Device &_device)
{
  device = (VegaDevice *)&_device;
  changed = dirty = false;

  const DialogLook &look = UIGlobals::GetDialogLook();

  WidgetDialog dialog(look);

  ArrowPagerWidget widget(dialog, look.button,
                          new VegaConfigurationExtraButtons(dialog));
  FillPager(widget);

  dialog.CreateFull(UIGlobals::GetMainWindow(), _("Vario Configuration"),
                    &widget);

  widget.SetPageFlippedCallback([&dialog, &widget](){
      UpdateCaption(dialog, widget.GetCurrentIndex());
    });
  UpdateCaption(dialog, widget.GetCurrentIndex());

  dialog.ShowModal();
  dialog.StealWidget();

  return changed || dialog.GetChanged();
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:27,代码来源:VegaConfigurationDialog.cpp

示例2: UpdateCaption

void Windows9::Execute(){
	
	SDL_Event *currentEvent = myGraphic->getEvent();
	
	UpdateCaption();
	myGraphic->activeInputText();
	myText = "NewFolder";
	myNewFolder->setMessageChanged(true);
					
	while(termination == false){
		
		displayBasics();

		while(SDL_PollEvent(currentEvent)){
			
			if(currentEvent->type == SDL_QUIT){
				termination = true;
			}
			else if(currentEvent->type == SDL_MOUSEMOTION){
				xPosOfMouse = currentEvent->button.x;
				yPosOfMouse = currentEvent->button.y;
				//cout << "x: " << xPosOfMouse << " y: " << yPosOfMouse << endl;
				checkMouseState(xPosOfMouse, yPosOfMouse);
			}
			else if(currentEvent->type == SDL_MOUSEBUTTONDOWN){
				xPosOfMouse = currentEvent->button.x;
				yPosOfMouse = currentEvent->button.y;
				cout << "x: " << xPosOfMouse << " y: " << yPosOfMouse << endl;
				checkMouseClicked(xPosOfMouse, yPosOfMouse);
			}
			else if(currentEvent->type == SDL_KEYDOWN && myNewFolder->getActivation()){
				
				if( currentEvent->key.keysym.sym == SDLK_BACKSPACE && myText.length() > 0 ){
					myNewFolder->setMessageChanged(true);
					myText.pop_back();
				}
			}
			if(currentEvent->type == SDL_TEXTINPUT && myNewFolder->getActivation()){
				myNewFolder->setMessageChanged(true);
				myText += currentEvent->text.text;
			}
		}
		
		if(myNewFolder->getActivation() && myNewFolder->getMessageChanged() == true){
			myNewFolder->setName(myText);
			cout << "text: " << myNewFolder->getName() << endl;
		}
		myGraphic->display();
		UpdateCaption();
	}
	myGraphic->deactiveInputText();
	
}
开发者ID:hmdgharb,项目名称:Windows9,代码行数:53,代码来源:Windows9.cpp

示例3: DoHexEditor

void DoHexEditor()
{
	WNDCLASSEX wndclass;

	if (!HexEditorHWnd)
	{
		memset(&wndclass,0,sizeof(wndclass));
		wndclass.cbSize=sizeof(WNDCLASSEX);
		wndclass.style         = CS_HREDRAW | CS_VREDRAW ;
		wndclass.lpfnWndProc   = HexEditorProc ;
		wndclass.cbClsExtra    = 0 ;
		wndclass.cbWndExtra    = 0 ;
		wndclass.hInstance     = ghInstance;
		wndclass.hIcon         = LoadIcon(ghInstance, MAKEINTRESOURCE(IDI_GENS));
		wndclass.hIconSm       = LoadIcon(ghInstance, MAKEINTRESOURCE(IDI_GENS));
		wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW);
		wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
		wndclass.lpszClassName = "HEXEDITOR";

		if(!RegisterClassEx(&wndclass))
		{
			Put_Info("Error Registering HEXEDITOR Window Class.");
			return;
		}

		HexEditorHWnd = CreateWindowEx(
			0,
			"HEXEDITOR",
			"HexEditor",
			WS_SYSMENU | WS_MINIMIZEBOX | WS_VSCROLL,
			CW_USEDEFAULT,
			CW_USEDEFAULT,
			580,
			248,
			NULL,
			NULL,
			ghInstance,
			NULL
		);
		ShowWindow(HexEditorHWnd, SW_SHOW);
		UpdateCaption();
		DialogsOpen++;
	}
	else
	{
		ShowWindow(HexEditorHWnd, SW_SHOWNORMAL);
		SetForegroundWindow(HexEditorHWnd);
		UpdateCaption();
	}
}
开发者ID:Miinky-EmuDev,项目名称:gens-rerecording,代码行数:50,代码来源:hexeditor.cpp

示例4: UpdateCaption

void __fastcall TConjoinDockHost::FormDockDrop(TObject *Sender,
      TDragDockObject *Source, int X, int Y)
{
  UpdateCaption(NULL);
  DockManager->ResetBounds(true);
  // Force DockManager to redraw it's clients.
}
开发者ID:SkylineNando,项目名称:Delphi,代码行数:7,代码来源:conjoinhost.cpp

示例5: AddText

void
PlaneEditWidget::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
  AddText(_("Registration"), nullptr, plane.registration, this);
  AddText(_("Comp. ID"), nullptr, plane.competition_id);
  AddButton(_("Polar"), *this, POLAR);
  AddText(_("Type"), nullptr, plane.type);
  AddInteger(_("Handicap"), nullptr,
             _T("%u %%"), _T("%u"),
             50, 150, 1,
             plane.handicap);
  AddFloat(_("Wing Area"), nullptr,
           _T("%.1f m²"), _T("%.1f"),
           fixed(0), fixed(40), fixed(0.1),
           false, plane.wing_area);
  AddFloat(_("Max. Ballast"), nullptr,
           _T("%.0f l"), _T("%.0f"),
           fixed(0), fixed(500), fixed(5),
           false, plane.max_ballast);
  AddInteger(_("Dump Time"), nullptr,
             _T("%u s"), _T("%u"),
             10, 300, 5,
             plane.dump_time);
  AddFloat(_("Max. Cruise Speed"), nullptr,
           _T("%.0f %s"), _T("%.0f"), fixed(0), fixed(300), fixed(5),
           false, UnitGroup::HORIZONTAL_SPEED, plane.max_speed);

  UpdateCaption();
  UpdatePolarButton();
}
开发者ID:Adrien81,项目名称:XCSoar,代码行数:30,代码来源:PlaneDetailsDialog.cpp

示例6: switch

bool
QuickMenu::KeyPress(unsigned key_code)
{
  switch (key_code) {
  case KEY_LEFT:
    grid_view.MoveFocus(GridView::Direction::LEFT);
    break;

  case KEY_RIGHT:
    grid_view.MoveFocus(GridView::Direction::RIGHT);
    break;

  case KEY_UP:
    grid_view.MoveFocus(GridView::Direction::UP);
    break;

  case KEY_DOWN:
    grid_view.MoveFocus(GridView::Direction::DOWN);
    break;

  case KEY_MENU:
    grid_view.ShowNextPage();
    SetFocus();
    break;

  default:
    return false;
  }

  UpdateCaption();
  return true;
}
开发者ID:Exadios,项目名称:xcsoar-exp,代码行数:32,代码来源:dlgQuickMenu.cpp

示例7: while

void MainGameLoop::Run()
{
   FrameCounter fc;

   // main game loop
   while (!m_bExitLoop)
   {
      OnTick();

      ProcessEvents();
      if (m_bExitLoop)
         break;

      if (!m_bAppActive)
      {
         // as we're not visible, just wait for next event
         SDL_WaitEvent(NULL);
         continue;
      }

      // render the scene
      {
         OpenGL::ResetPolycount();

         OnRender();

         fc.OnNextFrame();
      }

      // count ticks for fps
      double dFramesPerSecond;
      if (m_bUpdateFrameCount && fc.GetUpdatedCount(dFramesPerSecond))
         UpdateCaption(dFramesPerSecond);
   }
}
开发者ID:zengnotes,项目名称:MultiplayerOnlineGame,代码行数:35,代码来源:MainGameLoop.cpp

示例8: 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

示例9: UpdateCaption

void CTreePropSheet::OnPageTreeSelChanged(NMHDR *pNotifyStruct, LRESULT *plResult)
{
	*plResult = 0;

	UpdateCaption();

	return;
}
开发者ID:elha,项目名称:CDex,代码行数:8,代码来源:TreePropSheet.cpp

示例10: UpdateCaption

void __fastcall TfrmMain::UpdateAllCaptions()
{
  int Index;

  for (Index = 0; Index < ControlCount; Index++)
    if (dynamic_cast<TJvFullColorLabel*>(Controls[Index]))
       UpdateCaption(dynamic_cast<TJvFullColorLabel*>(Controls[Index]));
}
开发者ID:AndyTheFactory,项目名称:jvcl,代码行数:8,代码来源:MainForm.cpp

示例11: UpdateCaption

//-----------------------------------------------------------------------------
//! 
//-----------------------------------------------------------------------------
void tRudderBarMedusa::SetVirtualFeedback( bool on )
{
    if( m_VirtualFeedback != on )
    {
        m_VirtualFeedback = on;
        UpdateCaption();
    }
}
开发者ID:dulton,项目名称:53_hero,代码行数:11,代码来源:tRudderBarMedusa.cpp

示例12: OverviewRefreshTask

static void OverviewRefreshTask(void) {
  LockTaskData();
  RefreshTask();

  int i;
  // Only need to refresh info where the removal happened
  // as the order of other taskpoints hasn't changed
  UpLimit = 0;
  lengthtotal = 0;
  for (i=0; i<MAXTASKPOINTS; i++) {
  if (Task[i].Index != -1) {
      lengthtotal += Task[i].Leg;
      UpLimit = i+1;
    }
  }

  // Simple FAI 2004 triangle rules
  fai_ok = true;
  if (lengthtotal>0) {
    for (i=0; i<MAXTASKPOINTS; i++) {
      if (Task[i].Index != -1) {
	double lrat = Task[i].Leg/lengthtotal;
	if ((lrat>0.45)||(lrat<0.10)) {
	  fai_ok = false;
	}
      }
    }
  } else {
    fai_ok = false;
  }

  RefreshTaskStatistics();

  WndProperty* wp;

  wp = (WndProperty*)wf->FindByName(TEXT("prpAATEst"));
  if (wp) {
    double dd = CALCULATED_INFO.TaskTimeToGo;
//    if ((CALCULATED_INFO.TaskStartTime>0.0)&&(CALCULATED_INFO.Flying)) { patchout 091126
    if ( (CALCULATED_INFO.TaskStartTime>0.0)&&(CALCULATED_INFO.Flying) &&(ActiveTaskPoint>0)) { // patch 091126



      dd += GPS_INFO.Time-CALCULATED_INFO.TaskStartTime;
    }
    dd= min(24.0*60.0,dd/60.0);
    wp->GetDataField()->SetAsFloat(dd);
    wp->RefreshDisplay();
  }

  LowLimit =0;
  wTaskList->ResetList();
  wTaskList->Redraw();

  UpdateCaption();
  UnlockTaskData();

}
开发者ID:lshachar,项目名称:LK8000,代码行数:58,代码来源:dlgTaskOverview.cpp

示例13: UpdateCaption

void
MacCreadySetupPanel::OnAction(int id)
{
  TaskBehaviour &task_behaviour = CommonInterface::SetComputerSettings().task;
  task_behaviour.auto_mc = !task_behaviour.auto_mc;
  Profile::Set(ProfileKeys::AutoMc, task_behaviour.auto_mc);

  UpdateCaption();
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:9,代码来源:MacCreadySetup.cpp

示例14: SetTitle

void CPreferencesDlg::Localize()
{
	SetTitle(RemoveAmbersand(GetResString(IDS_EM_PREFS))); 

	m_wndGeneral.Localize();
	m_wndDisplay.Localize();
	m_wndConnection.Localize();
	m_wndServer.Localize();
	m_wndDirectories.Localize();
	m_wndFiles.Localize();
	m_wndStats.Localize();
	m_wndNotify.Localize();
	m_wndIRC.Localize();
	m_wndSecurity.Localize();
	m_wndTweaks.Localize();
	m_wndWebServer.Localize();
	m_wndScheduler.Localize();
	m_wndProxy.Localize();
	m_wndMessages.Localize();
	m_wndXtreme.Localize(); //Xman Xtreme Mod
	m_wndXtreme2.Localize(); //Xman Xtreme Mod
	m_wndScar.Localize(); // ScarAngel Preferences window - Stulle

	int c = 0;

	CTreeCtrl* pTree = GetPageTreeControl();
	if (pTree)
	{
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_GENERAL)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_DISPLAY))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_CONNECTION))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_PROXY))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_SERVER))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_DIR))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_FILES))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_EKDEV_OPTIONS))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_STATSSETUPINFO))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_IRC)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_MESSAGESCOMMENTS)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_SECURITY))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_SCHEDULER)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_WS)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_TWEAK)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_XTREMESETTINGS)) + _T(" I")); //Xman Xtreme Mod
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_XTREMESETTINGS)) + _T(" II")); //Xman Xtreme Mod
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_SCARANGEL))); // ScarAngel Preferences window - Stulle
	#if defined(_DEBUG) || defined(USE_DEBUG_DEVICE)
		pTree->SetItemText(GetPageTreeItem(c++), _T("Debug"));
	#endif
	}

	//Xman Preferences Banner
	m_banner.UpdateSize();
	//Xman end

	UpdateCaption();
}
开发者ID:brolee,项目名称:EMule-GIFC,代码行数:57,代码来源:PreferencesDlg.cpp

示例15: 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


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