Define the global function. first obtain the parent window, and then obtain
Call enumwindows.
// Int Top = 0;
// Bool callback enumwindowsproc_1 (hwnd, lparam );
// Bool callback enumchildwindowsproc_1 (hwnd hwndparent, lparam );
// Bool callback enumwindowsproc_1 (hwnd, lparam)
//{
// Char lpwintitle [256];
//: Getwindowtext (hwnd, lpwintitle, 256-1 );
// Cstring m_strtitle;
// M_strtitle.format ("% s", lpwintitle );
// If (m_strtitle.find ("autoscaling 2006 ")! =-1)
//{
// Enumchildwindows (hwnd, enumchildwindowsproc_1, 0 );
//}
//
// Return true;
//}
// bool callback enumchildwindowsproc_1 (hwnd hwndparent, lparam)
// {
// hwnd parentwnd = hwndparent;
// char lpwintitle [256];
//: getwindowtext (hwndparent, lpwintitle, 256-1);
// cstring m_strtitle;
// m_strtitle.format ("% s", lpwintitle);
// If (m_strtitle.find (". DWG ")! =-1 & m_strtitle.find ("AutoCAD") =-1)
// {
// afxmessagebox ("ssssssssssss ");
// crect rect;
//: getclientrect (hwndparent, & rect);
// cpoint point;
// point. X = rect. left;
// point. y = rect. top;
//: clienttoscreen (parentwnd, & Point);
// Top = point. y;
//}
// return true;
//}