Red de conocimiento informático - Problemas con los teléfonos móviles - ¿Cómo obtiene VC los ID de todos los botones de la interfaz?

¿Cómo obtiene VC los ID de todos los botones de la interfaz?

Código de muestra

std::vectorlt;UINTgt;buttonIds;

//Obtiene la primera ventana secundaria. Úselo.

HWND hwnd = :: GetWindow( GetSafeHwnd(),

GW_CHILD | GW_HWNDFIRST

TCHAR className[]=_T("Botón");

If (GetClassName(hwnd, className, sizeof(className)/sizeof( TCHAR)) amp; _tcscmp(className, _T("Button")))

buttonIds.push_back (GetDlgCtrlID (hwnd));

while( hwnd )

{

// Obtiene la siguiente ventana.

hwnd = :: GetWindow( hwnd, GW_HWNDNEXT);

if (GetClassName(hwnd, className, sizeof(className)/sizeof( TCHAR)) amp; amp; _tcscmp(className) , _T("Botón")))

buttonIds.push_back(GetDlgCtrlID(hwnd));

}