Obtaining window handle (hWnd)

Discussion in 'HTML' started by brewman, Oct 15, 2003.

  1. brewman

    brewman Guest

    I've got an OCX I want to be able to use in HTML, but one of the
    methods requires the main window handle. This is not the same as the
    handle you get from window.self Does anyone know how to extract
    either the browser handle or a frame handle from withing HTML. I can
    utilize most any scripting language (VBScript, JavaScript, WShell,
    etc)

    Thanks,
    bk
    brewman, Oct 15, 2003
    #1
    1. Advertising

  2. In article <>, brewman <>
    says...
    > I've got an OCX I want to be able to use in HTML, but one of the
    > methods requires the main window handle. This is not the same as the
    > handle you get from window.self Does anyone know how to extract
    > either the browser handle or a frame handle from withing HTML.


    You cannot.

    > I can
    > utilize most any scripting language (VBScript, JavaScript, WShell,
    > etc)


    Can't the OCX get it?

    --
    Hywel I do not eat quiche
    http://hyweljenkins.co.uk/
    http://hyweljenkins.co.uk/mfaq.php
    Hywel Jenkins, Oct 15, 2003
    #2
    1. Advertising

  3. brewman

    brewman Guest

    On Wed, 15 Oct 2003 18:50:14 +0100, Hywel Jenkins
    <> wrote:

    >In article <>, brewman <>
    >says...
    >> I've got an OCX I want to be able to use in HTML, but one of the
    >> methods requires the main window handle. This is not the same as the
    >> handle you get from window.self Does anyone know how to extract
    >> either the browser handle or a frame handle from withing HTML.

    >
    >You cannot.
    >
    >> I can
    >> utilize most any scripting language (VBScript, JavaScript, WShell,
    >> etc)

    >
    >Can't the OCX get it?


    I wish it could.
    brewman, Oct 15, 2003
    #3
  4. brewman

    Whitecrest Guest

    In article <>, brewman <>
    says...
    > >Can't the OCX get it?

    > I wish it could.


    Since you already are going to require an OCX, why not just make a
    Wrapper OCX that creates the instance of the Original OCX, and find the
    window handle with that?


    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Oct 15, 2003
    #4
  5. <brewman> schreef in bericht
    news:...
    > I've got an OCX I want to be able to use in HTML, but one of the
    > methods requires the main window handle. This is not the same as the
    > handle you get from window.self Does anyone know how to extract
    > either the browser handle or a frame handle from withing HTML. I can
    > utilize most any scripting language (VBScript, JavaScript, WShell,
    > etc)
    >
    > Thanks,
    > bk


    'Extracting' a handle of a window or anything else is impossible in HTML.
    You can how ever read the handles in use in real time using some freeware
    utilitie,
    there are plenty out there.
    Window handles are (mostly) usefull for programmers only, and making use of
    such a handle
    requires a programming language such as Delphi, Pascal, C, C++, hell even
    Visual Basic will do.
    but VBScript, Javascript and such scripting languages can not control the
    system at such a low-level.
    Though you never know on a windows system... :)

    Are you sure your in the right group?


    --
    With regards,
    Samuël van Laere
    the Netherlands
    Samuël van Laere, Oct 16, 2003
    #5
  6. brewman

    brewman Guest

    Thanks for the help. You've all basically confirmed what I thought,
    but I was hoping someone out there had solved this problem.

    As to whether I am in the right group the answer is yes. You've
    answered the question I had even if it wasn't what I wanted to hear.

    Some background on this problem. I have been tasked to take an
    existing product my company already owns and has licensed for use and
    try and find a way to use it in a browser based application.
    Unfortunately it is a bit of a square peg/round hole problem and I'm
    looking for a shim to make it work.

    As someone has mentioned one option would be to write an OCX wrapper,
    but I've run into some issues doing this which are beyond the scope of
    this particular forum. If you know of an applet which will identify
    the handle of the window it's launched from I would greatly
    appreciate being pointed in the right direction.

    thanks
    BK


    On Thu, 16 Oct 2003 01:31:17 GMT, "Samuël van Laere"
    <> wrote:

    ><brewman> schreef in bericht
    >news:...
    >> I've got an OCX I want to be able to use in HTML, but one of the
    >> methods requires the main window handle. This is not the same as the
    >> handle you get from window.self Does anyone know how to extract
    >> either the browser handle or a frame handle from withing HTML. I can
    >> utilize most any scripting language (VBScript, JavaScript, WShell,
    >> etc)
    >>
    >> Thanks,
    >> bk

    >
    >'Extracting' a handle of a window or anything else is impossible in HTML.
    >You can how ever read the handles in use in real time using some freeware
    >utilitie,
    >there are plenty out there.
    >Window handles are (mostly) usefull for programmers only, and making use of
    >such a handle
    >requires a programming language such as Delphi, Pascal, C, C++, hell even
    >Visual Basic will do.
    >but VBScript, Javascript and such scripting languages can not control the
    >system at such a low-level.
    >Though you never know on a windows system... :)
    >
    >Are you sure your in the right group?
    brewman, Oct 16, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Storm
    Replies:
    2
    Views:
    891
    Storm
    Oct 16, 2004
  2. LT
    Replies:
    7
    Views:
    2,079
    Phlip
    Jul 25, 2004
  3. Joseph
    Replies:
    3
    Views:
    1,235
    Howard
    Jul 20, 2005
  4. pythonprogrammer
    Replies:
    1
    Views:
    467
    Srini
    Sep 5, 2005
  5. Quentin Pope

    Getting console window's hWnd

    Quentin Pope, Aug 13, 2011, in forum: C Programming
    Replies:
    12
    Views:
    1,872
    Keith Thompson
    Aug 15, 2011
Loading...

Share This Page