If you want to get the value from an edit control you don't actually use GetMessage
at all. GetMessage
is for receiving messages, but to get the text from a window you have to send it a message - i.e. you use SendMessage
.
The message to send is WM_GETTEXT
(preceeded by WM_GETTEXTLENGTH
). Or even easier, use one of the wrapper functions the OS provides for you - in this instance GetWindowText
or GetDlgItemText
. They work across thread boundaries just fine (and in fact even across process boundaries).