DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
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
    >
    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links