Announcement

Collapse
No announcement yet.

Windows handles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Windows handles

    I read somewhere that handles to applications (hwnd) can change dynamically if windows so desires?

    Is this true?

    Reason I ask is that I am going to store all of the handles to the browser that is open, if there are 5 browsers open I want to store all of the handles in an array until each browser is closed....


    Thanks,

    Scott

    ------------------
    Scott
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2

    Scott,

    I can't think for a moment how that would be possible, since most applications use a GLOBAL variable to store window handles on creation, if it were true, it would probably break every windows app in existence.

    Of course, the handle is changed when you destroy\create a window.

    BTW. Where did you read that?!?

    Regards,

    ------------------
    Kev G Peel
    KGP Software, Bridgwater, UK.
    http://www.kgpsoftware.com
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

    Comment


    • #3
      I don't recall, some VB5 book long ago I believe...
      And perhaps in VB it is true...
      Anyway that's the answer I'm looking for, it will make life a LOT easier to manage the windows handles and URL's I have to stick in the array...


      Thanks,


      Scott

      ------------------
      Scott
      Scott Turchin
      MCSE, MCP+I
      http://www.tngbbs.com
      ----------------------
      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

      Comment


      • #4
        I am quite certain that window handles can't change spontaneously.

        Perhaps they meant that if a window is destroyed and re-created it may come back with a different window hande? For example, if you use FindWindow to obtain a handle to a window, and if that window is destroyed and re-created with the same title, it will not necessarily have the same handle value as the original.

        Grasping at straws...

        -- Eric


        ------------------
        Perfect Sync Development Tools
        Perfect Sync Web Site
        Contact Us: mailto:[email protected][email protected]</A>
        "Not my circus, not my monkeys."

        Comment


        • #5
          Scott, (hi, btw, long time no see), I think you may be recalling
          some pseudo-handles. I *think* real numbers for thread ids,
          app instances, and (something else, can't remember) can change
          in Windows, but are still usable from a fixed value inside your
          app because it remaps the pseudohandle for you automatically
          (a pointer to a pointer, I beleive). I think certain of these
          values can't be passed to outside processes without converting
          it to a real handle (DuplicateHandle()??) first.

          But, I'm probably remembering it all wrong myself



          ------------------
          Troy King
          [email protected]
          Troy King
          katravax at yahoo dot com

          Comment

          Working...
          X