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


C++ FindWindowById函数代码示例

本文整理汇总了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);
   }
}
开发者ID:GYGit,项目名称:Audacity,代码行数:19,代码来源:TruncSilence.cpp

示例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);
}
开发者ID:eb1,项目名称:adaptit,代码行数:19,代码来源:GoToDlg.cpp

示例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();
}
开发者ID:BananaMuffinFrenzy,项目名称:dolphin,代码行数:10,代码来源:FrameAui.cpp

示例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 );

}
开发者ID:ruthmagnus,项目名称:audacity,代码行数:19,代码来源:TruncSilence.cpp

示例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);
	}
开发者ID:jemmyw,项目名称:openttd,代码行数:15,代码来源:network_content_gui.cpp

示例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);
    }
}
开发者ID:vomikan,项目名称:moneymanagerex,代码行数:10,代码来源:mmcustomdata.cpp

示例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();
}
开发者ID:J0anJosep,项目名称:OpenTTD,代码行数:17,代码来源:osk_gui.cpp

示例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;
	}
}
开发者ID:blackberry,项目名称:OpenTTD,代码行数:10,代码来源:misc_sl.cpp

示例9: FindWindowById

void lms_suiteFrame::OnShowModule(wxCommandEvent& event)
{
    wxWindow *item = NULL;
    item = FindWindowById(event.GetId());
    if(item)
    {
        panelsManager->GetPane(item).Show();
        panelsManager->Update();
    }
}
开发者ID:limemicro,项目名称:lms6suite,代码行数:10,代码来源:lms_suiteMain.cpp

示例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 );
}
开发者ID:metropt,项目名称:kicad-source-mirror,代码行数:11,代码来源:schframe.cpp

示例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);
	}
}
开发者ID:tmphuang6,项目名称:amule,代码行数:11,代码来源:KadDlg.cpp

示例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;
}
开发者ID:Konnekt,项目名称:lib-sipx,代码行数:11,代码来源:DialEntryPanel.cpp

示例13: FindWindowById

void CDialogWarnHistory::OnCheck(wxCommandEvent &)
{
  if(m_pButtonNO == NULL)
  {
    m_pButtonNO = FindWindowById(wxID_NO, this);
  }
  if(m_pButtonNO != NULL)
  {
    m_pButtonNO->Enable(!DontShowAgain());
  }
}
开发者ID:ForensicBioinformatics,项目名称:osiris,代码行数:11,代码来源:CDialogWarnHistory.cpp

示例14: FindWindowById

bool cbAuiNotebook::IsFocusStored(wxWindow* page)
{
    wxWindow* win = FindWindowById(m_LastId);
    while (win)
    {
        if (win == page)
            return true;
        win = win->GetParent();
    }
    return false;
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:11,代码来源:cbauibook.cpp

示例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();
}
开发者ID:astojilj,项目名称:astoj_oolongengine,代码行数:12,代码来源:Adjuster.cpp


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