Sending text to the focused control on Parent Dialog?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Sending text to the focused control on Parent Dialog?

  1. #1
    Join Date
    May 2011
    Posts
    1

    Question Sending text to the focused control on Parent Dialog?

    Hi Everyone,

    I am currently writing an application which contains two MFC Dialogs. One of the dialogs is basically an on screen numeric keypad (Buttons 1 - 9 and a Dot).

    When I press number 1 for example, I need to be able to send a number 1 to whatever control has focus on the parent dialog. I have done this previously using .NET but I am now focusing on writing in C++/MFC.

    If you need any more information please enquire. I hope someone can help me.

    Cheers,
    Luke

  2. #2
    Join Date
    Apr 2009
    Posts
    598

    Re: Sending text to the focused control on Parent Dialog?

    If the child windows knows the handle of the control where data should be sent, then you can write SetWindowText();

    Otherwise the child window might send a user defined message to the parent window with PostMessage();, and the parent window will catch this particular message and send data to its focussed control with SetWindowText();.

Tags for this Thread

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center