| |

VerySource

 Forgot password?
 Register
Search
View: 735|Reply: 3

How to trigger the right-click menu of a ListBox with a message

[Copy link]

3

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-4 18:20:01
| Show all posts |Read mode
The ListBox of another program has a right-click menu. The handle of the ListBox has been obtained. How can I send a message to trigger the ListBox menu and select the items in it?
Reply

Use magic Report

0

Threads

24

Posts

19.00

Credits

Newbie

Rank: 1

Credits
19.00

 China

Post time: 2020-1-19 12:45:01
| Show all posts
Simulate mouse messages directly?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 United States

Post time: 2020-7-27 23:15:02
| Show all posts
SendMessageT((HWND)hRightView, WM_RBUTTONDOWN, MK_RBUTTON, (LPARAM)(MAKELPARAM(p.x, p.y)));
SendMessageT((HWND)hRightView, WM_RBUTTONUP, MK_RBUTTON, (LPARAM)(MAKELPARAM(p.x, p.y)));

I just did this, but now I don’t know how to send commands to the menu, I don’t seem to use wm_command. Does anyone have any good solutions
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-4 12:30:01
| Show all posts
wm_mousemove
wm_lbuttondown
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list