Hi, i have very little experience in MFC and VC++. I was developing a small project, during development i need to view the list of all opened windows in my explorer. i read somewhere and like to post the solution of this only for you 🙂

It is very simple. here is the example by which you can display titles of each window opened. try this and enjoy.
In your OnInitDialog() write this…

HWND hnd = ::GetWindow(::GetDesktopWindow(), GW_CHILD);
CWnd *pWnd;
CString csTitle = “”;

while( (hnd != NULL) )
pWnd = CWnd::FromHandle(hnd);

MessageBox(csTitle, “Title”, NULL);
hnd = *pWnd->GetNextWindow(GW_HWNDNEXT);