void SuperbikeControl::GetChildWindow(CWnd *cwnd)
{ CWnd *wnd = cwnd->GetWindow (GW_CHILD); if (wnd != NULL) { wnd->PostMessageW (WM_KEYDOWN, VK_ESCAPE, 0); Sleep(50); wnd->PostMessageW (WM_KEYUP, VK_ESCAPE, 0); PlaySound(_T("sound\\bell.wav"), NULL, SND_FILENAME | SND_ASYNC); Sleep(1000); GetChildWindow(wnd); } else { wnd = cwnd->GetWindow (GW_HWNDNEXT); if (wnd != NULL) { wnd->PostMessageW (WM_KEYDOWN, VK_ESCAPE, 0); Sleep(50); wnd->PostMessageW (WM_KEYUP, VK_ESCAPE, 0); PlaySound(_T("sound\\bell.wav"), NULL, SND_FILENAME | SND_ASYNC); Sleep(1000); GetChildWindow(wnd); } }}