本文整理汇总了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();
}
示例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();
}
示例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();
}
}
示例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.
}
示例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();
}
示例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;
}
示例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);
}
}
示例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();
}
示例9: UpdateCaption
void CTreePropSheet::OnPageTreeSelChanged(NMHDR *pNotifyStruct, LRESULT *plResult)
{
*plResult = 0;
UpdateCaption();
return;
}
示例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]));
}
示例11: UpdateCaption
//-----------------------------------------------------------------------------
//!
//-----------------------------------------------------------------------------
void tRudderBarMedusa::SetVirtualFeedback( bool on )
{
if( m_VirtualFeedback != on )
{
m_VirtualFeedback = on;
UpdateCaption();
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
}
}