Let's say I've got a window for which I want to simulate a mouse click
at a specific x, y coordinate. I already have the hwnd but I'm not sure
how to construct the lParam. I've used SendMessage in the past to click
on buttons, etc., but I knew their hwnds. How do I construct the lParam.
Per the MSDN docs:

 

http://msdn.microsoft.com/en-us/library/ms645607(VS.85).aspx

lParam

The low-order word specifies the x-coordinate of the cursor. The
coordinate is relative to the upper-left corner of the client area. 

The high-order word specifies the y-coordinate of the cursor. The
coordinate is relative to the upper-left corner of the client area. 

 

 

 

lParam = ???

win32gui.SendMessage(hwnd, win32con.WM_LBUTTONDOWN, 0, lParam)

win32gui.SendMessage(hwnd, win32con.WM_LBUTTONUP, 0, lParam)

 

 

Any help would be greatly appreciated. I also can't help but wonder if
I'm going about this the wrong way. My end goal is clicking on a certain
Tab in a TabCtrl (in this case _wx_SysTabCtl32). I used EnumChildWindows
to find all the main window's children, but couldn't find the tabs. So
figured I would try to 'click' on the tab.

 

-Kyle Rickey 

 

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to