Please help with Menu Capture, thank you.
-
Hi, I am trying the following code to enumerate child windows of Start Menu. However, it doesn't seem to work. Could you take a look and tell me what I did wrong or is there another way to do it. Thank you very much. RECT rcMenu; BOOL CaptureMenuToClipboard(BOOL fIncMouseCursor, BOOL fIncMenuBar) { /*BOOL bSuccess = FALSE; POINT ptStartMenu; ptStartMenu.x = 1; ptStartMenu.y = 1; HWND hStartMenu; HWND hShellTrayWindow = FindWindow("Shell_TrayWnd", NULL); hStartMenu = ChildWindowFromPoint(hShellTrayWindow, ptStartMenu); if (EnumChildWindows(hStartMenu, (WNDENUMPROC)EnumChildProc, NULL)) bSuccess = TRUE; if (bSuccess) { if (!CopyScreenToClipboard(NULL, &rcMenu, fIncMouseCursor)) bSuccess = FALSE; } return bSuccess;*/ } BOOL CALLBACK EnumThreadWndProc(HWND hwnd, LPARAM lParam) { BOOL bFlag = FALSE; if (GetWindowRect(hwnd, &rcMenu)) bFlag = TRUE; return bFlag; } :) ;) ;) ;) :-D