Sup guys,
A part of my menu is supposed to capture all open windows and list them, the problem is; since the number of windows could be random I have no way of knowing what's open so I need to know what the user clicked on, I prepared this piece of code to do that -
[WM_COMMAND]
...
default :
{
POINT CurMPos;
int SelMI;
char MenuString[255];
GetCursorPos(&CurMPos);
SelMI = MenuItemFromPoint(hWnd, WindowList, CurMPos);
GetMenuString(WindowList, SelMI, MenuString, 255, MF_BYPOSITION);
MessageBox(NULL, MenuString, "Selected Window", MB_OK);
}
...
Sadly enough though my program does not retrieve the title... Do you guys know what went wrong or of any easier way?
Thanks.