0

I need to add checkbox in tab header of CMFCTabCtrl. Since I am not finding anything for it, I planned to set icon in tab header.

when click on icon i need to display checkbox with tickmark or without tickmark.

So how to determine that the point is on icon area?

  • When you get the click event you have the mouse coordinates. You can subclass the control and analyze the Windows message WM_LBUTTONDOWN. However a checkbox on a tab is not really a good idea. You should re-think that. I'm sure there is better way to implement whatever you want to achieve with this. – Elmue Jun 21 '18 at 04:48
  • I have already subclassed and have added WM_LBUTTONDOWN message but I don't know how to get icon rect alone. –  Jun 21 '18 at 04:52
  • Use TCM_GETITEMRECT to get the rectangle of the tab. The icon should be some pixles from the left of the tab. – Elmue Jun 21 '18 at 05:09
  • TCM_GETITEMRECT is for CTabCtrl. I am using CMFCTabCtrl. –  Jun 21 '18 at 06:14

0 Answers0