> To get an HICON for a button on a toolbar called m_toolbar, do this:
> 
> CImageList    *pImgToolbar ;
> HICON         hIcoButton ;
> int                   iButtonIndex, iImageIndex ;
> UINT          uCmdID, uStyle ;
> 
> iButtonIndex = m_toolbar.CommandToIndex(command_id_of_button e.g.
ID_BTN_SAVE);
> m_toolbar.GetButtonInfo(iButtonIndex, 
> uCmdID, uStyle, iImageIndex); CToolBarCtrl& rToolbarCtrl = 
> m_toolbar.GetToolBarCtrl(); pImgToolbar = 
> rToolbarCtrl.GetImageList(); if (pImgList != NULL)
>       hIcoButton = pImgToolbar->ExtractIcon(iImageIndex);

Thanks.

I did it using manual icons.  Some of them must be manual as they are not on
the toolbar.  Do you think I should put the ones that are on the toolbar
into the button via your method, or just keep separate icons?  I think maybe
do it like above so that we only have one icon to worry about...


This email and any attached files are confidential and copyright protected.
If you are not the addressee, any dissemination of this communication is
strictly prohibited. Unless otherwise expressly agreed in writing, nothing
stated in this communication shall be legally binding.



_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription 
changes, and list archive.

Reply via email to