How to Insert a CButton into a CListControl ? [modified]
-
Well I got this need to have a CListControl that should have a button in a given column ( Not all columns ). When this button is clicked I should catch the event and throw some actions, such as opening a dialog etc. My question is how do I insert a CButton to a CListCtrl ? I tried
CRect r; GetSubItemRect(r)
and creating the button in this rect. But the problem is that the button doesnt get erased / painted nicely when the columns are resized. Please tell me how I could hav the Button resize / reposition when the List Control or its columns are resized. ... Or if there are any other easy ways to get the job done ! thanx a lot :) -- modified at 3:26 Thursday 25th January, 2007 -
Well I got this need to have a CListControl that should have a button in a given column ( Not all columns ). When this button is clicked I should catch the event and throw some actions, such as opening a dialog etc. My question is how do I insert a CButton to a CListCtrl ? I tried
CRect r; GetSubItemRect(r)
and creating the button in this rect. But the problem is that the button doesnt get erased / painted nicely when the columns are resized. Please tell me how I could hav the Button resize / reposition when the List Control or its columns are resized. ... Or if there are any other easy ways to get the job done ! thanx a lot :) -- modified at 3:26 Thursday 25th January, 2007Have a look at this[^] article.
Prasad Notifier using ATL | Operator new[],delete[][^]
-
Well I got this need to have a CListControl that should have a button in a given column ( Not all columns ). When this button is clicked I should catch the event and throw some actions, such as opening a dialog etc. My question is how do I insert a CButton to a CListCtrl ? I tried
CRect r; GetSubItemRect(r)
and creating the button in this rect. But the problem is that the button doesnt get erased / painted nicely when the columns are resized. Please tell me how I could hav the Button resize / reposition when the List Control or its columns are resized. ... Or if there are any other easy ways to get the job done ! thanx a lot :) -- modified at 3:26 Thursday 25th January, 2007Here is I saw examples of listctrl of Chris Maunder and other programmers see Listctrl section on the MFC controls
WhiteSky