How to put an icon in .ico file on a toolbar button?
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
:confused:Hi there, I have a number of .ico files, each having an icon in it. I want to build a toolbar containing buttons, each having an icon from one of these .ico files. Kindly tell me how to do this. Regards:confused: Gaurav Gumber
I would do it the following way: 1) Load the icon using the
LoadIcon
API function. 2) Use theGetIconInfo
API function to get aICONINFO
structure which contains aHBITMAP
handle to the color bitmap. 3) Set the toolbar-button's bitmap using the MFCCToolBar::SetBitmap
function. Hope that helps :-D Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT)