[saco] Implement CDXUTDialog::AddControl(...)

This commit is contained in:
RD42 2024-05-24 23:06:24 +08:00
parent 0c26d699c2
commit 66cb7f0290
2 changed files with 21 additions and 0 deletions

View File

@ -312,6 +312,26 @@ HRESULT CDXUTDialog::InitControl( CDXUTControl* pControl )
//--------------------------------------------------------------------------------------
HRESULT CDXUTDialog::AddControl( CDXUTControl* pControl )
{
HRESULT hr = S_OK;
hr = InitControl( pControl );
if( FAILED(hr) )
return DXTRACE_ERR( "CDXUTDialog::InitControl", hr );
// Add to the list
hr = m_Controls.Add( pControl );
if( FAILED(hr) )
{
return DXTRACE_ERR( "CGrowableArray::Add", hr );
}
return S_OK;
}
//--------------------------------------------------------------------------------------
// CDXUTControl class
//--------------------------------------------------------------------------------------

View File

@ -91,6 +91,7 @@ public:
CDXUTDialog();
~CDXUTDialog();
HRESULT AddControl( CDXUTControl* pControl );
HRESULT InitControl( CDXUTControl* pControl );