On 12/6/2014 10:45 AM, "chong kyong kim" wrote:
I have been playing round with SendMessage(). In [Q2] in the program below,
SendMessage(subhWnd,WM_LBUTTONUP,0,0) invokes WM_LBUTTONUP twice in the
sub window.
case WM_COMMAND: {
switch(LOWORD(wParam)) {
case IDC_EDIT: { //working on the edit box IDC_EDIT.
cout<<"SendMessage(LBUTTONUP)\n";//[Q1] Prints twice?
SendMessage(subhWnd,WM_LBUTTONUP,0,0); //[Q2]Sends WM_LBUTTOMUP twice?
I suppose a control with the ID of IDC_EDIT sends two different notifications, so you send WM_LBUTTONUP message twice - once for each such notification.
Igor Tandetnik