CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2011
    Posts
    25

    GetWindowText and SendMessage

    I am trying to read text from one textbox in a windows form, and then at the click of a button transfer the contents of that textbox to another form.
    My thinking is that I need to use GetWindowText to find the text within the textbox and then use the SendMessage to send it to another form.
    I cannot find any examples of this being done so would need a little bit of guidence in order to complete this.

    If anyone is able to help that would be great!!

  2. #2
    Join Date
    May 2005
    Posts
    4,954

    Re: GetWindowText and SendMessage

    Maybe this can help.

    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

  3. #3
    Join Date
    Mar 2011
    Posts
    25

    Re: GetWindowText and SendMessage

    Golan, that link sent me to use MFC but I am using a windows form application rather than an MFC so when trying to follow the instructions on that I came to a dead end, plus I am using VC++ 2010 so a few of the instructions were out of date.

    Cheers

  4. #4
    Join Date
    Mar 2011
    Posts
    25

    Re: GetWindowText and SendMessage

    When attempting to use the class wizard, (well this could also be because I am not using an MFC application right enough) I am not seeing some of the options that they are saying I take. I really need to figure this part out, its the last part of my system I need and I then need to right up a dissertation on it and it is due next tuesday, so apoligies if panic starts to set in

  5. #5
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: GetWindowText and SendMessage

    Quote Originally Posted by Scott.Gallagher View Post
    Golan, that link sent me to use MFC but I am using a windows form application rather than an MFC so when trying to follow the instructions on that I came to a dead end, plus I am using VC++ 2010 so a few of the instructions were out of date.

    Cheers
    This is the wrong forum for Forms applications.

  6. #6
    Join Date
    Mar 2011
    Posts
    25

    Re: GetWindowText and SendMessage

    Then what forum is the right forum for forms applications?

  7. #7
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: GetWindowText and SendMessage

    Quote Originally Posted by Scott.Gallagher View Post
    Then what forum is the right forum for forms applications?
    It's not that hard to read the list of forums and figure it out.
    http://www.codeguru.com/forum/forumdisplay.php?f=17

  8. #8
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: GetWindowText and SendMessage

    Quote Originally Posted by Scott.Gallagher View Post
    Then what forum is the right forum for forms applications?
    A forum in which you are clearly presenting your problem.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

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