摘要:
使用下面的函数,可实现将指定文件缩放后显示到按钮上。前提是先将图片按钮的Bitmap属性设置为True。#include <atlimage.h>void CtestAppDlg::DrawPictureOnButton(CWnd *pBtn, const CString &sFilePath){ CBitmapButton *pBmpBtn = (CBitmapButton *)pBtn; CImage img; img.Load(sFilePath); HBITMAP bitmap = img.Detach(); RECT rc; pBmpBtn->GetWind 阅读全文