CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Set window text

  1. #1
    Join Date
    Nov 2001
    Location
    Kerala,India
    Posts
    650

    Set window text

    Hi all,

    Can i set the value of a text box in form of another application from my application. I want to set the values in one application by reading from a text file from my application. How can i do this.
    Do rate this post if it find useful to you

  2. #2
    Join Date
    Nov 2008
    Posts
    13

    Re: Set window text

    If you want to send text to an application which is created by yourself refer this article:

    http://www.codeguru.com/cpp/w-p/syst...icle.php/c2879

    Or if you want send to an application that you dont have full control then you can set the text by sending WM_SETTEXT message to the textbox you wish the value to appear.
    Last edited by unnamed; December 20th, 2008 at 11:03 AM.

  3. #3
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: Set window text

    Are both application written by you?
    If not, how do you know that control that you are trying to set text draws text itself?
    Not all windows react to WM_SETTEXT message the same way.
    Some set text to a client area and some to a title bar (if window has WS_CAPTION style).
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured