window handle


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: window handle

  1. #1
    andy Guest

    window handle


    Hi, All

    Can I get the application window handle if I know the application name in
    the process? The FindWindow function only can be used when the caption of
    it is known.

    Thanks,

    andy



  2. #2
    Phani Guest

    Re: window handle


    Yes. You can get window handle through FindWindow either by supplying its
    caption or by supplying its classname or both. For example to get a handle
    to a running instance of Excel through its classname, the following can be
    used:

    hWindow=FindWindow(XLMain, vbNullString).

    Classnames of applications can be obtained through spy++ utility.

    Phani.

    "andy" <andy_weihuang@yahoo.com> wrote:
    >
    >Hi, All
    >
    >Can I get the application window handle if I know the application name in
    >the process? The FindWindow function only can be used when the caption of
    >it is known.
    >
    >Thanks,
    >
    >andy
    >
    >



  3. #3
    Phani Guest

    Re: window handle


    Yes. You can get window handle through FindWindow either by supplying its
    caption or by supplying its classname or both. For example to get a handle
    to a running instance of Excel through its classname, the following can be
    used:

    hWindow=FindWindow(XLMain, vbNullString).

    Classnames of applications can be obtained through spy++ utility.

    Phani.

    "andy" <andy_weihuang@yahoo.com> wrote:
    >
    >Hi, All
    >
    >Can I get the application window handle if I know the application name in
    >the process? The FindWindow function only can be used when the caption of
    >it is known.
    >
    >Thanks,
    >
    >andy
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center