Ejemplo n.º 1
0
Hearthstone::Hearthstone()
 : mRestartRequired( false )
{
#ifdef Q_OS_MAC
  mCapture = new OSXWindowCapture( WindowName() );
#elif defined Q_OS_WIN
  mCapture = new WinWindowCapture( WindowName() );
#endif
}
Ejemplo n.º 2
0
HRESULT BaseWindow::Create(HINSTANCE hInstance)
{
	m_hInstance = hInstance;

	HRESULT hr = Register();
	if (SUCCEEDED(hr))
	{
		HWND hwnd = CreateWindow(
			ClassName(),
			WindowName(), 
			WS_OVERLAPPEDWINDOW,
			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 
			NULL, 
			NULL, 
			m_hInstance, 
			this);

		if (hwnd == 0)
		{
			hr =  __HRESULT_FROM_WIN32(GetLastError());
		}
	}

	return hr;
}
Ejemplo n.º 3
0
CUIWindow*	CUIWindow::FindChild(const shared_str name)
{
	if(WindowName()==name)
		return this;

	WINDOW_LIST::const_iterator it = m_ChildWndList.begin();
	WINDOW_LIST::const_iterator it_e = m_ChildWndList.end();
	for(;it!=it_e;++it){
		CUIWindow* pRes = (*it)->FindChild(name);
		if(pRes != NULL)
			return pRes;
	}
	return NULL;
}
Ejemplo n.º 4
0
CUIWindow*	CUIWindow::FindChild(const shared_str name, u32 max_nested)
{
	if ( IsDebuggerPresent() && WindowName().size() != 0)
	  	 MsgV ("8WINDOWS", "checking child '%-32s' for sample '%s'", WindowName().c_str(), name.c_str()); // позволяет сдампить названия контролов, при неуспешном поиске

	if( WindowName() == name)
		return this;

	if (0 == max_nested)
		return NULL;

//.	m_dbg_flag.set(256,TRUE);
	WINDOW_LIST::const_iterator it = m_ChildWndList.begin();
	WINDOW_LIST::const_iterator it_e = m_ChildWndList.end();
	for(;it!=it_e;++it){
		CUIWindow* pRes = (*it)->FindChild(name, max_nested - 1);
		if(pRes != NULL)
			return pRes;
	}

//.	m_dbg_flag.set(256,FALSE);
	return NULL;
}