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 9285975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:18:04+00:00 2026-06-18T19:18:04+00:00

I get a window handle using this code: var h: THandle; … h :=

  • 0

I get a window handle using this code:

var h: THandle;
...
h := FindWindow('MozillaWindowClass', NIL);

h is valid (> 0).

How do I find out if this window has ANY children windows?

I cannot use FindWindowEx(), as it requires a class name.

What I want to accomplish here is to find out if the MozillaWindowClass window belongs to Thunderbird or Firefox. It looks like Thunderbird has a MozillaWindowClass without children, but Firefox not, so it would be a quick way to find out. (I cannot go about the process name using CreateToolhelp32Snapshot(), because my code needs to run also on Windows 2000).

  • 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-06-18T19:18:05+00:00Added an answer on June 18, 2026 at 7:18 pm

    The simplest way to determine whether or not a window has any children is to call GetWindow passing GW_CHILD.

    function HasChildren(Window: HWND): Boolean;
    begin
      Result := GetWindow(Window, GW_CHILD)<>0;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to get the main window handle using following code in Lazarus (Free
In Watir you can get WIN32OLE handle of IE window using next method. irb(main):059:0>
Using the bellow code, I am activating a window on X11. I'm using FindWindow
Is there a way to get the window handle (IntPtr) for a window after
I am trying to get the handle of a window from a process. Now,
I'm trying to get a handle to the foreground window in C#/Net 2.0/WinForms by
I'm using the following javascript code to display xml/xsl: function loadXMLDoc(fname) { var xmlDoc;
Monotouch 5.0.2. Running the simple code below I get this in the output panel:
I need to get the current foreground window handle and compare it to a
I'm using this code for getting the shell icon (the one displayed in Windows

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.