Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3619896
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:56:10+00:00 2026-05-18T22:56:10+00:00

I am using the following enumchild proc to get hwnd of each window, the

  • 0

I am using the following enumchild proc to get hwnd of each window, the problem is that i am unable to somehow detect any info from each hwnd so i can do what i want with the ones that are detected as the ones i need.

For example, how could i get window class name and the title of each window in the enum bellow?

I tried something like..

EDITED: copy pasted(if that helps)

TCHAR cName[MAX_PATH];

BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam) {


 TCHAR cName[MAX_PATH];
 GetClassName(hwnd, cName, _countof(cName));
  cout << cName << endl;

     return TRUE; 
}

int _tmain(int argc, _TCHAR* argv[])
{


    HWND hwnd = FindWindow(0, TEXT("reference"));
    EnumChildWindows(hwnd, EnumChildProc, 0);

    system("PAUSE");
 return 0;
}

It just returns the hexadec handle info and every single time it is same, shouldnt the GetClassName func change the cName into new handle each time?

Also GetClassName function returns number of chars written to cName, i dont really see how this is useful to me? I need to get my cName in some readable format so i can do something like

if(className == TEXT(“classnameiamlookingfor” && hwndtitle = TEXT(“thetitlethatinterestsme”) DOSOMETHINGWITHIT();

But all i get here is hexadec mess.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:56:10+00:00Added an answer on May 18, 2026 at 10:56 pm

    Isn’t it Unicode build?

    Check again with below:

    TCHAR className[MAX_PATH];
    GetClassName(hwnd, className, _countof(cName));
    _tprintf(cName);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using following code I try to get updated list of checkbuttons' corresponding text values,
I am using following code to get bitmap from url. This function is used
I'm Using following code in flex4 mxml That works fine. <mx:Button label=Set focus to
Currently I am using following function to get the temporary folder path for current
I am using following form but when I am submitting form without entering any
I'm using following code to get client IP address for a JAX-WS one-way method
I am using following single threaded appartment. I am unable to reclaim memory/other resources
I'm using following model to store info about pages: class Page(models.Model): title = models.TextField(blank
I am using following code to get List from xml file - public static
I am Using Following Code for Send the Email from my application but problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.