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


C++ Handle::SetText方法代码示例

本文整理汇总了C++中win::dow::Handle::SetText方法的典型用法代码示例。如果您正苦于以下问题:C++ Handle::SetText方法的具体用法?C++ Handle::SetText怎么用?C++ Handle::SetText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在win::dow::Handle的用法示例。


在下文中一共展示了Handle::SetText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: dlgWin

bool Progress::MultiCtrlHandler::OnInitDialog () 
{
	Win::Dow::Handle dlgWin (GetWindow ());
	_caption.Init (dlgWin, Progress::MultiMeterDialog::CaptionId);
	_overallActivity.Init (dlgWin, Progress::MultiMeterDialog::OverallActivityId);
	_overallBar.Init (dlgWin, Progress::MultiMeterDialog::OverallProgressBarId);
	_specificActivity.Init (dlgWin, Progress::MultiMeterDialog::SpecificActivityId);
	_specificBar.Init (dlgWin, Progress::MultiMeterDialog::SpecificProgressBarId);
	_cancel.Init (dlgWin, Out::Cancel);

	dlgWin.SetText (_dlgData.GetTitle ());
	dlgWin.CenterOverOwner ();

	if (!_overall.CanCancel ())
		_cancel.Disable ();

	_progressTimer.Attach (dlgWin);
	unsigned int initialDelay = _dlgData.GetInitialDelay ();
	if (initialDelay != 0)
	{
		// Wait initial delay milliseconds before showing progress meter
		_progressTimer.Set (initialDelay);
	}
	else
	{
		_progressTimer.Set (Progress::CtrlHandler::Tick);	// Progress tick is 0,5 second
		Show ();
	}

	return true;
}
开发者ID:dbremner,项目名称:WinLib,代码行数:31,代码来源:MultiProgressDialog.cpp

示例2: BrowseCallbackProc

int CALLBACK FolderBrowser::BrowseCallbackProc (HWND winBrowseDlg,
												UINT uMsg,
												LPARAM lParam,
												LPARAM lpData)
{
	if (uMsg == BFFM_INITIALIZED && lpData != 0)
	{
		// lpData == _browseInfo.lParam == pointer to the initialization data
		std::pair<char const *, char const *> const * initData =
			reinterpret_cast<std::pair<char const *, char const *> const *>(lpData);
		Win::Dow::Handle dlgWin (winBrowseDlg);
		if (initData->first != 0)
		{
			// Window caption specified -- display it
			dlgWin.SetText (initData->first);
		}
		if (initData->second != 0)
		{
			// Startup folder specified -- expand it
			// Convert path to UNICODE
			std::wstring wPath = ::ToWString (initData->second);
			Win::Message msg (BFFM_SETEXPANDED, TRUE, reinterpret_cast<LPARAM>(wPath.c_str ()));
			dlgWin.SendMsg (msg);
		}
	}
	return 0;
}
开发者ID:dbremner,项目名称:WinLib,代码行数:27,代码来源:Shell.cpp

示例3: OnCreate

bool TopCtrl::OnCreate (Win::CreateData const * create, bool & success) throw ()
{
	Win::Dow::Handle win = GetWindow ();
	try
	{
		win.SetText ("Unit Test");
		Win::EditMaker editMaker (_h, 1);
		editMaker.Style () 
			<< Win::Edit::Style::MultiLine 
			<< Win::Edit::Style::AutoVScroll 
			<< Win::Style::Ex::ClientEdge
			<< Win::Style::AddVScrollBar;
		_output.Reset (editMaker.Create ());
		_watch.reset (new Watch (win));
		_timer.Attach (win);

		win.PostMsg (_initMsg);
		success = true;
	}
	catch (Win::Exception e)
	{
		TheOutput.Display (e);
		success = false;
	}
	catch (...)
	{
		Win::ClearError ();
		TheOutput.Display ("Initialization -- Unknown Error", Out::Error);
		success = false;
	}
	TheOutput.SetParent (win);
	_ready = true;
	return true;
}
开发者ID:BartoszMilewski,项目名称:WinLib,代码行数:34,代码来源:TopCtrl.cpp

示例4: OnCreate

bool TopCtrl::OnCreate (Win::CreateData const * create, bool & success) 
{
	Win::Dow::Handle win = GetWindow ();
	ResString caption (win.GetInstance (), ID_CAPTION);
	try
	{
		TheOutput.Init (caption);
		win.SetText (caption);
		_commander.reset (new Commander (win));
		_commander->SetModelessManager (&_modelessMan);
		_cmdVector.reset (new CmdVector (Cmd::Table, _commander.get ()));
		Accel::Maker accelMaker (Accel::Keys, *_cmdVector);
		_kbdAccel.reset (new Accel::Handler (win, accelMaker.Create ()));
		_msgPrepro.SetKbdAccelerator (_kbdAccel.get ());
		_menu.reset (new Menu::DropDown (Menu::barItems, *_cmdVector));
		_menu->AttachToWindow (win);
		_view.reset (new View (win));
		RegisterAsDropTarget(win);

		win.PostMsg (_initMsg);
		success = true;
	}
	catch (Win::Exception e)
	{
		TheOutput.Display (e);
		success = false;
	}
	catch (...)
	{
		Win::ClearError ();
		TheOutput.Display ("Initialization -- Unknown Error", Out::Error);
		success = false;
	}
	TheOutput.SetParent (win);
	_ready = true;
	return true;
}
开发者ID:dbremner,项目名称:WinLib,代码行数:37,代码来源:TopCtrl.cpp


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