Problem with Bitmap Buttons

Hi,

iam trying to get bitmaps on my buttons.
sounds easy enough, but i can't seem to get it done.

I think you have to use a function called AutoLoad or something.
Please help before i rip the last hair out my head.:mad:

Thanks in advance,
Darian

[edit: changed the thread subject]
[335 byte] By [darian] at [2007-11-18 17:42:58]
# 1 Re: Problem with Bitmap Buttons
I'm not sure about bitmaps, but with icons, this is how you do it:

((CButton *)GetDlgItem(IDC_MYBUTTON))->ModifyStyle(0,BS_ICON);
((CButton *)GetDlgItem(IDC_MYBUTTON))->SetIcon(::LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_MYICON)));

Regards / Z
zerver at 2007-11-11 1:26:01 >
# 2 Re: Problem with Bitmap Buttons
Thanks for the help, but it doesn't work.
But i think i will use icon instead, so thanks for that anyway.
darian at 2007-11-11 1:27:01 >