Примерно так:
BOOL CALLBACK EnumWindowsProc( HWND hwnd, LPARAM lParam ) {
wchar_t lpClassName[128] = {0};
MYSTRUCT* MS_INFO = ( MYSTRUCT* )lParam;
GetClassName( hwnd, lpClassName, _countof( lpClassName ) );
if( strstr( lpClassName, MS_INFO -> lpClassName ) ) {
wchar_t lpWindowName[128] = {0};
GetWindowText( hwnd, lpWindowName, _countof( lpWindowName ) );
if( strstr( lpWindowName, MS_INFO -> lpWindowName ) ) {
...
}
}
}