Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I emulate a change inCEdit? 1

Status
Not open for further replies.

firelex

Programmer
Jan 10, 2002
118
DE
Hello, all!
I have a dialog with a CEdit ([tt]IDC_START_FILTER[/tt]) in it.
also dialog has a message handling method:
Code:
ON_EN_CHANGE(IDC_START_FILTER, OnChangeStartFilter)
How can I emulate that something has been typed in IDC_START_FILTER to make the procedure [tt]OnChangeStartFilter();[/tt] be called?
The message [tt]EN_CHANGE[/tt] is got by the paranet window, isn't it?
So I tried
Code:
SendMessage(EN_CHANGE, IDC_START_FILTER, (LPARAM)GetDlgItem(IDC_START_FILTER)->m_hWnd);
It causes nothing.
 
try yourEdit->SetWindowText("something");

Ion Filipski
1c.bmp
 
:)))))))))))))))))))))))))))))))))))))
it is not an emulation, but it should work
Doesn't it go somehow with messages?
 
if you want just an emulation send the message not to your edit but to the directly dialog. Else you may send WM_KEYDOWN/WM_KEYUP/WM_CHAR to your edit and the edit will generate some messages for the parent dialog window.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top