本文整理汇总了C++中UpdateControls函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateControls函数的具体用法?C++ UpdateControls怎么用?C++ UpdateControls使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UpdateControls函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
//---------------------------------------------------------------------
void __fastcall TConsoleDialog::SetTerminal(TTerminal * value)
{
if (FTerminal != value)
{
if (FTerminal)
{
if (FClearExceptionOnFail)
{
FTerminal->ExceptionOnFail = false;
FClearExceptionOnFail = false;
}
assert(FTerminal->OnClose == TerminalClose);
FTerminal->OnClose = FPrevTerminalClose;
assert(FTerminal->OnChangeDirectory == DoChangeDirectory);
FTerminal->OnChangeDirectory = FOldChangeDirectory;
FOldChangeDirectory = NULL;
if (FDirectoryChanged)
{
FDirectoryChanged = false;
if (FTerminal->Active)
{
// directory would be read from EndTransaction anyway,
// but with reload only flag set, what prevents
// recording path in history, what we want if the path was
// changed by "cd" command in console
FTerminal->ReadDirectory(false);
}
}
FTerminal->EndTransaction();
}
FTerminal = value;
if (FTerminal)
{
OutputMemo->Clear();
FOldChangeDirectory = FTerminal->OnChangeDirectory;
FTerminal->OnChangeDirectory = DoChangeDirectory;
// avoid reloading directory after each change of current directory from console
FTerminal->BeginTransaction();
FLastTerminal = FTerminal;
FPrevTerminalClose = FTerminal->OnClose;
// used instead of previous TTerminalManager::OnChangeTerminal
FTerminal->OnClose = TerminalClose;
}
UpdateControls();
}
}
示例2: UpdateControls
//设置用户
VOID CUserInfoView::SetUserViewInfo(tagUserData const* pCurrentUserData)
{
//设置用户
if (m_pCurrentUserData!=pCurrentUserData)
{
//设置变量
m_pCurrentUserData=pCurrentUserData;
//更新界面
if (m_hWnd!=NULL) Invalidate(FALSE);
}
//更新控件
UpdateControls();
return;
}
示例3: UpdateInfo
void FIFOPlayerWindow::OnFIFOLoaded()
{
FifoDataFile* file = FifoPlayer::GetInstance().GetFile();
auto object_count = FifoPlayer::GetInstance().GetFrameObjectCount();
auto frame_count = file->GetFrameCount();
m_frame_range_to->setMaximum(frame_count);
m_object_range_to->setMaximum(object_count);
m_frame_range_to->setValue(frame_count);
m_object_range_to->setValue(object_count);
UpdateInfo();
UpdateLimits();
UpdateControls();
}
示例4: strlen
/** Appends a String to the current Text */
int TextArea::AppendText(const char* text, int pos)
{
int ret = 0;
if (pos >= ( int ) lines.size()) {
return -1;
}
int newlen = ( int ) strlen( text );
if (pos == -1) {
const char *note = NULL;
if (note_const) {
note = strstr(text,note_const);
}
char *str;
if (NULL == note) {
str = (char *) malloc( newlen +1 );
memcpy(str, text, newlen+1);
}
else {
unsigned int notepos = (unsigned int) (note - text);
str = (char *) malloc( newlen + CRAPLENGTH+1 );
memcpy(str,text,notepos);
memcpy(str+notepos,inserted_crap,CRAPLENGTH);
memcpy(str+notepos+CRAPLENGTH, text+notepos, newlen-notepos+1);
}
lines.push_back( str );
lrows.push_back( 0 );
ret =(int) (lines.size() - 1);
} else {
int mylen = ( int ) strlen( lines[pos] );
lines[pos] = (char *) realloc( lines[pos], mylen + newlen + 1 );
memcpy( lines[pos]+mylen, text, newlen + 1 );
ret = pos;
}
//if the textarea is not a listbox, then discard scrolled out
//lines
if (Flags&IE_GUI_TEXTAREA_HISTORY) {
DiscardLines();
}
UpdateControls();
return ret;
}
示例5: IsSignaled
bool emAvFileControlPanel::Cycle()
{
bool busy;
busy=emTkGroup::Cycle();
if (
IsSignaled(Mdl->GetInfoSignal()) ||
IsSignaled(Mdl->GetPlayStateSignal()) ||
IsSignaled(Mdl->GetAdjustmentSignal())
) {
UpdateControls();
}
if (IsSignaled(Mdl->GetPlayPosSignal())) {
SfPlayPos->SetValue(Mdl->GetPlayPos());
}
if (IsSignaled(SfPlayPos->GetValueSignal())) {
Mdl->SetPlayPos(SfPlayPos->GetValue());
}
if (IsSignaled(RgPlayState->GetCheckSignal())) {
if (RbStop->IsChecked()) Mdl->Stop();
else if (RbPause->IsChecked()) Mdl->Pause();
else if (RbPlay->IsChecked()) Mdl->Play();
else if (RbSlow->IsChecked()) Mdl->PlaySlow();
else if (RbFast->IsChecked()) Mdl->PlayFast();
}
if (IsSignaled(CbAudioMute->GetCheckSignal())) {
Mdl->SetAudioMute(CbAudioMute->IsChecked());
}
if (IsSignaled(SfAudioVolume->GetValueSignal())) {
Mdl->SetAudioVolume(SfAudioVolume->GetValue());
}
if (IsSignaled(SfAudioVisu->GetValueSignal())) {
Mdl->SetAudioVisu(SfAudioVisu->GetValue());
}
if (IsSignaled(SfAudioChannel->GetValueSignal())) {
Mdl->SetAudioChannel(SfAudioChannel->GetValue());
}
if (IsSignaled(SfSpuChannel->GetValueSignal())) {
Mdl->SetSpuChannel(SfSpuChannel->GetValue());
}
return busy;
}
示例6: SetIcon
BOOL CListViewSearchDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(m_icnWnd = theApp.LoadIcon(_T("Search")), FALSE);
InitWindowStyles(this);
SetWindowText(GetResString(IDS_SW_SEARCHBOX));
SetDlgItemText(IDC_LISTVIEW_SEARCH_TEXT_LBL, GetResString(IDS_SEARCH_TEXT) + _T(':'));
SetDlgItemText(IDC_LISTVIEW_SEARCH_COLUMN_LBL, GetResString(IDS_SEARCH_COLUMN) + _T(':'));
SetDlgItemText(IDCANCEL, GetResString(IDS_CANCEL));
GetDlgItem(IDOK)->SetWindowText(GetResString(IDS_TREEOPTIONS_OK));
if (!m_bCanSearchInAllColumns)
m_iSearchColumn = 0;
if (m_pListView != NULL)
{
TCHAR szColTitle[256];
LVCOLUMN lvc;
lvc.mask = LVCF_TEXT;
lvc.cchTextMax = sizeof(szColTitle)/sizeof(szColTitle[0]);
lvc.pszText = szColTitle;
int iCol = 0;
while (m_pListView->GetColumn(iCol++, &lvc))
{
m_ctlSearchCol.AddString(lvc.pszText);
if (!m_bCanSearchInAllColumns)
break;
}
if ((UINT)m_iSearchColumn >= (UINT)m_ctlSearchCol.GetCount())
m_iSearchColumn = 0;
}
else
{
m_ctlSearchCol.EnableWindow(FALSE);
m_ctlSearchCol.ShowWindow(SW_HIDE);
m_iSearchColumn = 0;
}
m_ctlSearchCol.SetCurSel(m_iSearchColumn);
UpdateControls();
return TRUE;
}
示例7: UpdateControls
uint32 CMenuPlayer::OnCommand(uint32 nCommand, uint32 nParam1, uint32 nParam2)
{
if (m_Popup.m_bWaitForUpdate)
{
if (nCommand == MC_UPDATE)
{
m_Popup.m_bWaitForUpdate = LTFALSE;
// g_pInterfaceMgr->GetMenuMgr()->HideSubMenu(true);
UpdateControls();
}
return 1;
}
if (nCommand == MC_UPGRADE && m_Upgrade.IsEnabled())
{
CAutoMessage cMsg;
cMsg.Writeuint8(MID_PLAYER_SKILLS);
cMsg.Writeuint8((uint8)g_nSkill);
g_pLTClient->SendToServer(cMsg.Read(), MESSAGE_GUARANTEED);
m_Popup.m_bWaitForUpdate = LTTRUE;
// Play upgrade sound...
g_pClientSoundMgr->PlayInterfaceSound("Interface\\Snd\\upgraded_skill.wav");
}
else if (nCommand >= MC_CUSTOM)
{
g_nSkill = nCommand - MC_CUSTOM;
UpdatePopup();
m_Points.SetString(FormatTempString(IDS_SKILL_AVAIL,g_pPlayerStats->GetAvailSkillPoints()));
m_Popup.ClearSelection();
m_Popup.PreviousSelection();
UpdateModText(true);
g_pInterfaceMgr->GetMenuMgr()->ShowSubMenu(&m_Popup);
}
else
{
return CBaseMenu::OnCommand(nCommand,nParam1,nParam2);
}
return 1;
}
示例8: assert
//---------------------------------------------------------------------------
void __fastcall TLogForm::SetSessionLog(TSessionLog * value)
{
if (FSessionLog != value)
{
if (SessionLog)
{
assert(SessionLog->OnStateChange == SessionLogStateChange);
SessionLog->OnStateChange = NULL;
}
FSessionLog = value;
if (SessionLog)
{
assert(SessionLog->OnStateChange == NULL);
SessionLog->OnStateChange = SessionLogStateChange;
}
UpdateControls();
}
}
示例9: UpdateControls
// CFileOpenDlg::OnClickFileList
//
// The user clicked the file list
//
void CFileOpenDlg::OnClickFileList(NMHDR* pNMHDR, LRESULT* pResult)
{
int iItem;
iItem = m_listFile.GetNextItem(-1, LVNI_SELECTED);
if(iItem != -1)
{
m_strFile = m_listFile.GetItemText(iItem, 0);
}
//
// Enable or disable the OK button
//
m_bOk = iItem != -1;
UpdateControls();
*pResult = 0;
}
示例10: UpdateControls
bool wxGenericFileDialog::Show( bool show )
{
// Called by ShowModal, so don't repeate the update
#ifndef __WIN32__
if (show)
{
#ifdef __WXGTK__
m_list->SetDirectory(m_dir);
#else
m_list->GoToDir(m_dir);
#endif
UpdateControls();
m_text->SetValue(m_fileName);
}
#endif
return wxDialog::Show( show );
}
示例11: gtk_widget_hide
bool CMatchingDlg::SelectFrame(int *frame_id)
{
m_FrameID = 0;
gtk_widget_hide(m_UseFrame);
ReadFrames(true, *frame_id);
SetSelectMode(REFERENCE_FRAME);
SetSortMode(m_FrameSort);
UpdatePreview(true);
UpdateControls();
if (gtk_dialog_run(GTK_DIALOG(m_pDlg))==GTK_RESPONSE_ACCEPT) {
g_Project->SetInt("MatchingDlg", "Frame", m_FrameID);
*frame_id = m_FrameID;
return true;
}
return false;
}
示例12: String
void ChannelCombinationInterface::__TargetImage_ViewSelected( ViewList& /*sender*/, View& view )
{
for ( int i = 0; i < 3; ++i )
instance.channelId[i].Clear();
if ( !view.IsNull() )
{
IsoString baseId = view.Id();
for ( int i = 0; i < 3; ++i )
{
String suffix = String( '_' ) + ColorSpaceId::ChannelId( instance.colorSpace, i );
if ( !View::ViewById( baseId + suffix ).IsNull() )
instance.channelId[i] = baseId + suffix;
}
}
UpdateControls();
}
示例13: GUIData
bool B3EInterface::Launch( const MetaProcess& P, const ProcessImplementation*, bool& dynamic, unsigned& /*flags*/ )
{
if ( GUI == 0 )
{
GUI = new GUIData( *this );
#ifdef __PCL_WINDOWS
// Windows doesn't support Unicode for standard UI fonts
SetWindowTitle( "B3E (Ballesteros Blackbody Estimator)" );
#else
const char16_type title[] = { 'B', '3', 0x2107, 0 };
SetWindowTitle( String( title ) + " (Ballesteros Blackbody Estimator)" );
#endif
UpdateControls();
}
dynamic = false;
return &P == TheB3EProcess;
}
示例14: SetWindowText
//初始函数
BOOL CDlgCustomFace::OnInitDialog()
{
__super::OnInitDialog();
//创建刷子
m_brBkground.CreateSolidBrush(BGROUND_COLOR);
//设置标题
SetWindowText(TEXT("自定义头像"));
//更新控件
UpdateControls();
//初始化设置
__super::InitSkinObject();
return TRUE;
}
示例15: GUIData
bool HDRCompositionInterface::Launch( const MetaProcess& P, const ProcessImplementation*, bool& dynamic, unsigned& /*flags*/ )
{
// ### Deferred initialization
if ( GUI == 0 )
{
GUI = new GUIData( *this );
SetWindowTitle( "HDRComposition" );
UpdateControls();
// Restore position only
if ( !RestoreGeometry() )
SetDefaultPosition();
AdjustToContents();
}
dynamic = false;
return &P == TheHDRCompositionProcess;
}