May 29th, 2011, 03:50 PM
Sending text to the focused control on Parent Dialog?
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.
May 30th, 2011, 04:15 AM
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
Click Here to Expand Forum to Full Width