-
May 29th, 2011, 03:50 PM
#1
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
-
May 30th, 2011, 04:15 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|