本文整理汇总了C++中AContainer::GetUICore方法的典型用法代码示例。如果您正苦于以下问题:C++ AContainer::GetUICore方法的具体用法?C++ AContainer::GetUICore怎么用?C++ AContainer::GetUICore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AContainer
的用法示例。
在下文中一共展示了AContainer::GetUICore方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _lastRelease
//最后一步真正的释放对象
//释放自己,也释放关注自己的对象
void AWinControlBase::_lastRelease()
{
AContainer* pcParent = dynamic_cast<AContainer*>(GetParent());
if( pcParent )
pcParent->GetUICore()->RemoveWatcher(this);
m_aWatchDelete.Clear();
Release();
}
示例2: Create
bool AWinControlBase::Create()
{
if( m_pWindow ) return true;
InitControls();
m_pWindow = CreateWnd();
if( m_pWindow == NULL ) return false;
m_pWindow->AddRef();
HWND hParent = NULL;
AControl* pParent = dynamic_cast<AControl*>( GetParent() );
if( pParent ) hParent = pParent->GetUICore()->GetHandle();
if( !m_pWindow->Create(hParent,m_WindowPos) )
{
m_pWindow->Release();
m_pWindow = NULL;
throw AException(_T("窗口创建失败!"));
return false;
}
AContainer* pcParent = dynamic_cast<AContainer*>(GetParent());
if( pcParent )
pcParent->GetUICore()->AddWatcher(this);
//再进行下面的处理
if( m_WindowPos == wpDesign )
{
::SetWindowPos(GetHandle(),HWND_NOTOPMOST,GetLeft(),GetTop(),GetWidth(),GetHeight(),SWP_NOREDRAW|SWP_HIDEWINDOW);
}
else if( m_WindowPos == wpCenterScreen )
{
ARect rScreen;
SystemParametersInfo(SPI_GETWORKAREA,0,&rScreen,0);
int dw = (rScreen.right-rScreen.left-GetWidth())/2;
int dh = (rScreen.bottom-rScreen.top-GetHeight())/2;
m_iLeft = (rScreen.left+dw);
m_iTop = (rScreen.top+dh);
::SetWindowPos(GetHandle(),HWND_NOTOPMOST,GetLeft(),GetTop(),GetWidth(),GetHeight(),SWP_NOREDRAW|SWP_HIDEWINDOW);
}
else
{
ARect r;
::GetWindowRect(GetHandle(),&r);
//::SetWindowPos(GetHandle(),HWND_NOTOPMOST,r.left,r.top+1,r.GetWidth(),r.GetHeight(),0);
m_iLeft = r.left;
m_iTop = r.top;
m_iWidth = r.GetWidth();
m_iHeight = r.GetHeight();
}
//::SetWindowPos(GetHandle(),HWND_NOTOPMOST,GetLeft(),GetTop(),GetWidth(),GetHeight(),0);//SWP_NOREDRAW|SWP_HIDEWINDOW);
//::SetWindowPos(GetHandle(),HWND_NOTOPMOST,GetLeft(),GetTop(),GetWidth(),GetHeight(),SWP_NOREDRAW|SWP_HIDEWINDOW);
DoCreate();
ConnectEvent();
DoLayout();
Refresh();
//HRGN hRgn = ::CreateRoundRectRgn(0,0,GetWidth()+1,GetHeight()+1,5,5);
//::SetWindowRgn(m_pWindow->GetHandle(),hRgn,FALSE);
//::DeleteObject(hRgn);
AEvent evt;
OnCreate.Call(this,&evt);
return true;
}