本文整理汇总了C++中FindWindowById函数的典型用法代码示例。如果您正苦于以下问题:C++ FindWindowById函数的具体用法?C++ FindWindowById怎么用?C++ FindWindowById使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FindWindowById函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void TruncSilenceDialog::UpdateUI()
{
wxWindow *pWnd;
switch (mEffect->mProcessIndex)
{
case 0:
pWnd = FindWindowById(ID_TRUNCATION_DURATION, this);
pWnd->Enable(true);
pWnd = FindWindowById(ID_COMPRESS_FACTOR, this);
pWnd->Enable(false);
break;
case 1:
pWnd = FindWindowById(ID_TRUNCATION_DURATION, this);
pWnd->Enable(false);
pWnd = FindWindowById(ID_COMPRESS_FACTOR, this);
pWnd->Enable(true);
}
}
示例2: AIModalDialog
CGoToDlg::CGoToDlg(wxWindow* parent) // dialog constructor
: AIModalDialog(parent, -1, _("Go To"),
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{
m_nChapter = 0;
m_nVerse = 1;
// This dialog function below is generated in wxDesigner, and defines the controls and sizers
// for the dialog. The first parameter is the parent which should normally be "this".
// The second and third parameters should both be TRUE to utilize the sizers and create the right
// size dialog.
GoToDlgFunc(this, TRUE, TRUE);
// The declaration is: GoToDlgFunc( wxWindow *parent, bool call_fit, bool set_sizer );
bool bOK;
bOK = gpApp->ReverseOkCancelButtonsForMac(this);
bOK = bOK; // avoid warning
m_pSpinCtrlChapter = (wxSpinCtrl*)FindWindowById(IDC_EDIT_CHAPTER);
m_pSpinCtrlVerse = (wxSpinCtrl*)FindWindowById(IDC_EDIT_VERSE);
}
示例3: DoUnfloatPage
void CFrame::DoUnfloatPage(int Id)
{
wxFrame * Win = (wxFrame*)FindWindowById(Id);
if (!Win) return;
wxWindow * Child = Win->GetChildren().Item(0)->GetData();
Child->Reparent(this);
DoAddPage(Child, g_pCodeWindow->iNbAffiliation[Child->GetId() - IDM_LOG_WINDOW], false);
Win->Destroy();
}
示例4: TransferDataFromWindow
void TruncSilenceDialog::OnDurationChange(wxCommandEvent & event)
{
// We may even get called during the constructor.
// This test saves us from calling unsafe functions.
if( !IsShown() )
return;
TransferDataFromWindow();
bool bOk = mEffect->mTruncLongestAllowedSilentMs > 0.9f ;
pWarning->SetLabel( bOk ?
wxT("") :
_(" Duration must be at least 1 millisecond")
);
wxWindow *pWnd;
pWnd = FindWindowById( wxID_OK, this );
pWnd->Enable( bOk );
pWnd = FindWindowById( ID_EFFECT_PREVIEW, this );
pWnd->Enable( bOk );
}
示例5: NetworkContentDownloadStatusWindow
/**
* Create a new download window based on a list of content information
* with flags whether to download them or not.
* @param infos the list to search in
*/
NetworkContentDownloadStatusWindow() :
cur_id(UINT32_MAX)
{
this->parent = FindWindowById(WC_NETWORK_WINDOW, 1);
_network_content_client.AddCallback(this);
_network_content_client.DownloadSelectedContent(this->total_files, this->total_bytes);
this->InitNested(&_network_content_download_status_window_desc, 0);
}
示例6: GetLabelID
void mmCustomData::ClearSettings() const
{
for (const auto &field : m_fields)
{
//wxWindowID controlID = GetBaseID() + (wxWindowID)field.FIELDID;
wxWindowID labelID = GetLabelID() + (wxWindowID)field.FIELDID;
wxCheckBox* cb = (wxCheckBox*)FindWindowById(labelID);
if (cb) cb->SetValue(false);
}
}
示例7: UpdateOSKOriginalText
/**
* Updates the original text of the OSK so when the 'parent' changes the
* original and you press on cancel you won't get the 'old' original text
* but the updated one.
* @param parent window that just updated its orignal text
* @param button widget number of parent's textbox to update
*/
void UpdateOSKOriginalText(const Window *parent, int button)
{
OskWindow *osk = dynamic_cast<OskWindow *>(FindWindowById(WC_OSK, 0));
if (osk == NULL || osk->parent != parent || osk->text_btn != button) return;
free(osk->orig_str_buf);
osk->orig_str_buf = stredup(osk->qs->text.buf);
osk->SetDirty();
}
示例8: SaveViewportBeforeSaveGame
void SaveViewportBeforeSaveGame()
{
const Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
if (w != NULL) {
_saved_scrollpos_x = w->viewport->scrollpos_x;
_saved_scrollpos_y = w->viewport->scrollpos_y;
_saved_scrollpos_zoom = w->viewport->zoom;
}
}
示例9: FindWindowById
void lms_suiteFrame::OnShowModule(wxCommandEvent& event)
{
wxWindow *item = NULL;
item = FindWindowById(event.GetId());
if(item)
{
panelsManager->GetPane(item).Show();
panelsManager->Update();
}
}
示例10: FindWindowById
void SCH_EDIT_FRAME::OnErc( wxCommandEvent& event )
{
// See if it's already open...
wxWindow* erc = FindWindowById( ID_DIALOG_ERC, this );
if( erc )
// Bring it to the top if already open. Dual monitor users need this.
erc->Raise();
else
InvokeDialogERC( this );
}
示例11: WXUNUSED
void CKadDlg::OnBnClickedUpdateNodeList(wxCommandEvent& WXUNUSED(evt))
{
if ( wxMessageBox( wxString(_("Are you sure you want to download a new nodes.dat file?\n")) +
_("Doing so will remove your current nodes and restart Kademlia connection.")
, _("Continue?"), wxICON_EXCLAMATION | wxYES_NO, this) == wxYES ) {
wxString strURL = dynamic_cast<wxTextCtrl*>(FindWindowById(IDC_NODESLISTURL))->GetValue();
thePrefs::SetKadNodesUrl(strURL);
theApp->UpdateNotesDat(strURL);
}
}
示例12: getEnteredText
const wxString DialEntryPanel::getEnteredText()
{
wxString phoneNumber;
wxComboBox* pCtrl = dynamic_cast<wxComboBox*>(FindWindowById(IDR_DIAL_ENTRY_TEXT, this));
if (pCtrl)
{
phoneNumber = pCtrl->GetValue();
}
return phoneNumber;
}
示例13: FindWindowById
void CDialogWarnHistory::OnCheck(wxCommandEvent &)
{
if(m_pButtonNO == NULL)
{
m_pButtonNO = FindWindowById(wxID_NO, this);
}
if(m_pButtonNO != NULL)
{
m_pButtonNO->Enable(!DontShowAgain());
}
}
示例14: FindWindowById
bool cbAuiNotebook::IsFocusStored(wxWindow* page)
{
wxWindow* win = FindWindowById(m_LastId);
while (win)
{
if (win == page)
return true;
win = win->GetParent();
}
return false;
}
示例15: wxGetColourFromUser
void TAdjuster::OnClick(wxCommandEvent& event)
{
if (pickers.find(event.GetId()) != pickers.end()) {
TUniform* uniform = pickers[event.GetId()];
wxColour color = uniform->GetColor();
color = wxGetColourFromUser(this, color);
uniform->SetColor(color);
FindWindowById(event.GetId())->SetBackgroundColour(color);
}
event.Skip();
}