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

  • Home
  • SEARCH
  • 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 6532573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:01:16+00:00 2026-05-25T10:01:16+00:00

Is it possible for 2 windows managed by Windows to have the same window

  • 0

Is it possible for 2 windows managed by Windows to have the same window handle value?

Consider both cases when these 2 windows are opened by the same process and when these 2 windows are opened by 2 different processes.

  • 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-25T10:01:17+00:00Added an answer on May 25, 2026 at 10:01 am

    Quick answer: no, it’s not possible if they are inside the same desktop, every window handle issued by the window manager is unique (inside its desktop) throughout all the existence of the window, otherwise it couldn’t uniquely identify such window on the system current window station desktop (which is defined by MSDN as “a logical display surface” that “contains user interface objects such as windows, menus, and hooks; it can be used to create and manage windows”).


    Long answer:

    The issue is discussed here, which points to this article. It seems that HWNDs are local to desktops , so you can have two identical HWNDs that point to two different windows, but they are necessarily in two separated desktops, so there’s no ambiguity (the WM handle you pass to every user32 function refers implicitly to the current desktop, to go to another one you have to use SetThreadDesktop, and this call fails if your thread owns any desktop-contained object into the current desktop).

    On the other hand, when a window is destroyed, its handle can be reused, but IIRC the window manager employs some techniques to avoid immediately reusing a handle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to configure Windows Servers that reside on the same domain such
Is it possible to create a form on Windows using Ruby? I have a
Is it possible to embed a windows form within another windows form? I have
Some Windows programs can use different icons for different files with the same extension.
I have a friend who did the same thing with window form. What I
Possible Duplicate: .NET windows application, can it be compressed into a single .exe? To
Is it possible to create Windows CE 5.0 images (ie: nk.bin) from VS2005/VS2008 without
Is it possible to target Windows Mobile 6 Professional and Standard from one project?
I'm looking to setup a lightweight, developer only web stack on Windows (and possible
Is it possible to write to the windows logs in python?

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.