In my MFC MDI application I have 10 CMFCToolBar
and each has separate imagelist(bitmap images).
I implemented task pane using CMFCTaskPane
in which I am grouping same tasks or activities what the CMFCToolbar
is doing.
Can I use/assign each CMFCToolbar
image list to the tasks coming under each group?
In CMFCTaskPane
class I only have these methods:
BOOL SetIconList(HIMAGELIST hIcons)
BOOL SetIconsList(UINT uiImageListResID, int cx, COLORREF clrTransparent = RGB(255, 0, 255))
In CMFCTaskPane
class we have an option to assign only one image list to the entire taskpane. There is no option to assign separate imagelist to each group and its tasks.
But I have 10 CMFCToolbar
and 10 CImageList
. How to use my toolbar images to achieve my requirement?
In this link https://www.codeproject.com/Articles/16529/Simple-Menus-That-Display-Icons-Minimalistic-Appro?msg=1895336
the toolbar images are used in the menu by overriding DrawItem() function similarly can we draw icon for a task by overriding the function
virtual void OnDrawTasks(CDC* pDC, CRect rectWorkArea); in the CMFCTaskPane
.
I dont have any idea on how to do it?