Click here to Skip to main content
15,903,741 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want a C++ MFC project to display the message deliver to tcp server ,now i want to add a button to end of the message list ,display on the message box,so I can change the message ,then send to the client,how can i do?

message box
-----------------------------------------------------
|message_list[0]|message_list[1]|...|button1|button2|
-----------------------------------------------------

What I have tried:

I hava tried the listctrl in MFC but I don't know how to add button, does anyone have the demo,thanks .
Posted
Updated 20-Apr-21 5:32am
Comments
Richard MacCutchan 20-Apr-21 6:35am    
I do not think the CListCtrl has an option to add buttons in a column. You could possibly manage it by using the LVS_EX_CHECKBOXES extended style.

1 solution

Richard is correct. There isn't an easy way to do that. I think you would be better off handling the double click notification (LBN_DBLCLK) and deal with it that. You can determine which list item was clicked and do what you described with it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900