开发者

How to make a Symbol-Button with 16x16 pixel icon-size?

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)));

How to make a Symbol-Button with 16x16 pixel icon-size?

Thanks for your help!


You can use LoadImage instead of LoadIcon which will allow you to specify the size.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜