I tried to make a Symbol Button with MFC. The Icon-Resource (*.ico) has a size of 16x16 pixels. When开发者_运维技巧 I load the icon into the button, the icon appears twice as large. Do you know how I can specify the size of the icon drawn onto the button-surface?
The Code Fragment I'm using:
CButton* btn = reinterpret_cast<CButton*>(GetDlgItem(IDC_BUTTON_RUNTER));
btn->SetIcon(AfxGetApp()->LoadIconA(MAKEINTRESOURCE(IDI_RUNTER)));
Thanks for your help!
You can use LoadImage
instead of LoadIcon
which will allow you to specify the size.
精彩评论