cbitmap - how to add bitmap image to buttons in MFC? -


i trying add image existing button..i have done extent, problem can add ownerdrawn image not able add extact image want.. example see below code

cbutton* pbtn= (cbutton*)getdlgitem(id_wizback);     pbtn->modifystyle( 0, bs_icon );     hicon hicn= (hicon)loadimage(         afxgetapp()->m_hinstance,   makeintresource(idi_icon3),         image_icon,         0,0, // use actual size         lr_defaultcolor     );      pbtn->seticon( hicn ); 

with above code converting bitmap icon add button...how can add exact bitmap image directly existing button.please me frnds..

i fixed problem..what did replaced hicon hbitmap , working perfect...basically both work fine in case when loaded icon button background of icon not changing...i tried bitmap work great. working on positioning image , add text...think go through


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -