Phil F
October 7th, 2002, 09:47 AM
Hi. I have created an edit control dynamically. I would like to know how to tell when that edit control is getting text typed into it. The outer IF statement works fine. But how do I limit my process to just the desired edit control. My question is; Does the pMsg contain information that would identify the control that sent the message?
BOOL CTestDlgDlg::PreTranslateMessage(MSG* pMsg)
{
static int iCount=0;
if(pMsg->message == WM_CHAR)
{
if(dynamically created edit control IDC_EDIT1 sent this message)
{
TRACE("IDC_EDIT1 got %d\n", iCount++);
}
}
return CDialog::PreTranslateMessage(pMsg);
}
:(
BOOL CTestDlgDlg::PreTranslateMessage(MSG* pMsg)
{
static int iCount=0;
if(pMsg->message == WM_CHAR)
{
if(dynamically created edit control IDC_EDIT1 sent this message)
{
TRACE("IDC_EDIT1 got %d\n", iCount++);
}
}
return CDialog::PreTranslateMessage(pMsg);
}
:(