![]() |
|
#6
|
|||
|
|||
|
I finally figure out why WM_LBUTTON does not trigger message processing of WM_NOTIFY. WM_NOTIFY should be simulated by posting two messages:
WM_LBUTTONDOWN WM_LBUTTONUP Here is the code: Code:
POINT ap={0x0027, 0x0289}, cp={0x0025, 0x00AE};
SetFocus((HWND)hTreeView);
SetCursorPos(ap.x, ap.y);
ScreenToClient((HWND)hTreeView, &ap);
cp = ap;
PostMessage((HWND)hTreeView, WM_LBUTTONDOWN, MK_LBUTTON, cp.y<<16 | cp.x);
PostMessage((HWND)hTreeView, WM_LBUTTONUP, 0, cp.y<<16 | cp.x);
If I substitute SendMessage() for PostMessage(), the above code will not work. So, I'm much indebted to bilbo. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simulating a Button Push | lilmeanman | General Discussion | 16 | 02-18-2005 09:24 |