| |

VerySource

 Forgot password?
 Register
Search
View: 731|Reply: 4

ListBox How to determine which item is double-clicked?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-9 12:20:01
| Show all posts |Read mode
There are several items in the CList. How do I get which item is double-clicked?
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-9 13:00:03
| Show all posts
m_list.GetText(m_list.GetCurSel(),tmp);

GetCurSel() returns the 0-based index value of the string currently selected in the list box

GetText: copy list items to buffer
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Germany

Post time: 2020-8-9 13:15:01
| Show all posts
Front + a CString tmp;
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-10 02:00:01
| Show all posts
Respond in the double-clicked message, and then use GetCurSel() to judge. I did this before
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-8-10 02:30:01
| Show all posts
If you can use clistctrl, there is a double click
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