• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ FindWindowById函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了FindWindowById函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: DrawWidget

	virtual void DrawWidget(const Rect &r, int widget) const
	{
		switch (widget) {
			case WID_S_LEFT:
				/* Draw the date */
				SetDParam(0, ((DateTicks)_date * DAY_TICKS_DAY_LENGTH) + _date_fract);
				DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP + 2, STR_WHITE_DATE_WALLCLOCK_LONG, TC_FROMSTRING, SA_HOR_CENTER);
				break;

			case WID_S_RIGHT: {
				/* Draw company money, if any */
				const Company *c = Company::GetIfValid(_local_company);
				if (c != NULL) {
					SetDParam(0, c->money);
					DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP + 2, STR_COMPANY_MONEY, TC_FROMSTRING, SA_HOR_CENTER);
				}
				break;
			}

			case WID_S_MIDDLE:
				/* Draw status bar */
				if (this->saving) { // true when saving is active
					DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP + 2, STR_STATUSBAR_SAVING_GAME, TC_FROMSTRING, SA_HOR_CENTER);
				} else if (_do_autosave) {
					DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP + 2, STR_STATUSBAR_AUTOSAVE, TC_FROMSTRING, SA_HOR_CENTER);
				} else if (_pause_mode != PM_UNPAUSED) {
					DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP + 2, STR_STATUSBAR_PAUSED, TC_FROMSTRING, SA_HOR_CENTER);
				} else if (this->ticker_scroll < TICKER_STOP && FindWindowById(WC_NEWS_WINDOW, 0) == NULL && _statusbar_news_item != NULL && _statusbar_news_item->string_id != 0) {
					/* Draw the scrolling news text */
					if (!DrawScrollingStatusText(_statusbar_news_item, this->ticker_scroll, r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP + 2, r.bottom)) {
						InvalidateWindowData(WC_STATUS_BAR, 0, SBI_NEWS_DELETED);
						if (Company::IsValidID(_local_company)) {
							/* This is the default text */
							SetDParam(0, _local_company);
							DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP + 2, STR_STATUSBAR_COMPANY_NAME, TC_FROMSTRING, SA_HOR_CENTER);
						}
					}
				} else {
					if (Company::IsValidID(_local_company)) {
						/* This is the default text */
						SetDParam(0, _local_company);
						DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP + 2, STR_STATUSBAR_COMPANY_NAME, TC_FROMSTRING, SA_HOR_CENTER);
					}
				}

				if (this->reminder_timeout > 0) {
					Dimension icon_size = GetSpriteSize(SPR_UNREAD_NEWS);
					DrawSprite(SPR_UNREAD_NEWS, PAL_NONE, r.right - WD_FRAMERECT_RIGHT - icon_size.width, r.top + WD_FRAMERECT_TOP + (int)(FONT_HEIGHT_NORMAL - icon_size.height) / 2);
				}
				break;
		}
	}
开发者ID:koreapyj,项目名称:openttd-yapp,代码行数:52,代码来源:statusbar_gui.cpp


示例17: if

void CompareDlg::UpdateOkButton() {
    bool isValid = false;
    const wxString leftPath = m_leftPathCtrl->GetValue();
    const wxString rightPath = m_rightPathCtrl->GetValue();

    if (!leftPath.empty() && ! rightPath.empty()) {
        if (wxDirExists(leftPath) && wxDirExists(rightPath)) isValid = true;
        else if (wxFileExists(leftPath) && wxFileExists(rightPath)) isValid = true;
    }

    wxWindow* okButton = FindWindowById(wxID_OK);
    if (okButton) okButton->Enable(isValid);
}
开发者ID:haixiaocy,项目名称:e,代码行数:13,代码来源:CompareDlg.cpp


示例18: wxASSERT

void wxCurlTransferDialog::OnPauseResume(wxCommandEvent &WXUNUSED(ev))
{
    wxASSERT(HasFlag(wxCTDS_CAN_PAUSE));

    if (m_pThread->IsRunning())
    {
        if (HandleCurlThreadError(m_pThread->Pause(), m_pThread))
        {
            FindWindowById(PauseResumeButtonId)->SetLabel(wxS("Resume"));

            if (m_pSpeed)
                m_pSpeed->SetLabel(wxS("0 (transfer paused)"));
        }
    }
    else
    {
        if (HandleCurlThreadError(m_pThread->Resume(), m_pThread))
        {
            FindWindowById(PauseResumeButtonId)->SetLabel(wxS("Pause"));
        }
    }
}
开发者ID:bdbcat,项目名称:squiddio_pi,代码行数:22,代码来源:dialog.cpp


示例19: FindWindowById

void WizardStartPage::OnRadioSelected(wxCommandEvent &event) {
	wxWindow *win = FindWindowById(wxID_FORWARD, GetParent());
	wxMessageDialog *dial;
	if (m_browseRadio->GetValue()) {
		win->SetLabel(wxT("Finish"));
		this->UpdateROMPathState();
		m_filePicker1->Enable(true);
		return;
	}
	win->SetLabel(wxT("Next >"));
	win->Enable(true);
	m_filePicker1->Enable(false);
}
开发者ID:alberthdev,项目名称:wxwabbitemu,代码行数:13,代码来源:wizardstart.cpp


示例20: FindWindowById

void EnvironmentSettingsDlg::OnChooseColour(wxCommandEvent& event)
{
    wxColourData data;
    wxWindow* sender = FindWindowById(event.GetId());
    data.SetColour(sender->GetBackgroundColour());

    wxColourDialog dlg(this, &data);
    PlaceWindow(&dlg);
    if (dlg.ShowModal() == wxID_OK)
    {
        wxColour colour = dlg.GetColourData().GetColour();
        sender->SetBackgroundColour(colour);
    }
}
开发者ID:stahta01,项目名称:EmBlocks,代码行数:14,代码来源:environmentsettingsdlg.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FindWindowEx函数代码示例发布时间:2022-05-30
下一篇:
C++ FindWindowA函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap