trouvain
asked on
Checkboxes in CListCtrl via StateImages
I'm looking for a solution:
I intend to implement a CListCtrl (Reportstyle) with Checkboxes at the head of each line (like CCheckBox).
I've created two state icons (checked, unchecked). But the problem that occured was that if I try to click on the checkbox nothing changed respectively the state of another line which was selected changed. Furthermore I don't only want to change thy state but to open an dialog at a double click to get more information from the user.
Thus my accurate questions:
- How can I include the checkbox range into the selection?
- How can I change the state of the checkbox by a single click on the checkbox field (like the CListBox behaviour)?
- How can I effectively open an dialog by a double click (Override WM_...)?
- How can I simply implement a functionality for exchanging two lines? I've tried this but every time the selection of the line I wanted to go down or up was gone.
I would be very grateful if if you could could show me the source code for a 3 row Control like discribed above.
Thank in advance.
I intend to implement a CListCtrl (Reportstyle) with Checkboxes at the head of each line (like CCheckBox).
I've created two state icons (checked, unchecked). But the problem that occured was that if I try to click on the checkbox nothing changed respectively the state of another line which was selected changed. Furthermore I don't only want to change thy state but to open an dialog at a double click to get more information from the user.
Thus my accurate questions:
- How can I include the checkbox range into the selection?
- How can I change the state of the checkbox by a single click on the checkbox field (like the CListBox behaviour)?
- How can I effectively open an dialog by a double click (Override WM_...)?
- How can I simply implement a functionality for exchanging two lines? I've tried this but every time the selection of the line I wanted to go down or up was gone.
I would be very grateful if if you could could show me the source code for a 3 row Control like discribed above.
Thank in advance.
Take a look at samples\mfc\general\rowlis t. To open dialog overide handle of WM_LBUTTONDBLCLK in your CListCtrl derived class and create and open dialog inside this function.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thsnx but you could be more specific