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

This commit is contained in:
RD42 committed 2024-05-29 16:32:30 +08:00
1 parent 937495a9b8
commit 92f47f526f
2 files changed
+21

No files matched your search

+19
View File
@@ -372,6 +372,25 @@ CDXUTControl* CDXUTDialog::GetControl( int ID, UINT nControlType )
//--------------------------------------------------------------------------------------
CDXUTControl* CDXUTDialog::GetNextControl( CDXUTControl* pControl )
{
int index = pControl->m_Index + 1;
CDXUTDialog* pDialog = pControl->m_pDialog;
// Cycle through dialogs in the loop to find the next control. Note
// that if only one control exists in all looped dialogs it will
// be the returned 'next' control.
while( index >= (int) pDialog->m_Controls.GetSize() )
{
pDialog = pDialog->m_pNextDialog;
index = 0;
}
return pDialog->m_Controls.GetAt( index );
}
//--------------------------------------------------------------------------------------
// CDXUTControl class
//--------------------------------------------------------------------------------------