How to get All HWNDS

Posted on 2005-04-01
Medium Priority
Last Modified: 2013-11-20
Hi All

I want to get the List of all HWNDS that are opened or executing in hidden mode based on the Title what I give

For example if the Title contains "Microsoft" I want to get all windows based on that title

I know that FindWindow can be used to fetch only one widow.


Question by:sudhakar_koundinya
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 16

Expert Comment

ID: 13680524
You can use EnumWindows to enumerate all the windows and then you can match their name against "Microsoft" in your EnumWndProc
LVL 16

Accepted Solution

nonubik earned 500 total points
ID: 13680558
BOOL CALLBACK MyEnumWindowsProc(  HWND hwnd,   LPARAM lParam)
  char szText[MAX_PATH];
  GetWindowText(hwnd, szText, MAX_PATH);
  if(strstr(szText, "Microsoft"))

And call EnumWindows(MyEnumWindowsProc, 0);

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question