把Button弄成CBitmapButton,可以在按钮上面加图片;
步骤1:把该按钮的Owner Draw弄成true;指定按钮为所有者描述的按钮;
步骤2:在初始化函数内添加如下:IDB_BITMAP_JIEPING为位图的ID号,IDC_BUTTON_JIEPING为按钮ID号;
((CBitmapButton*)GetDlgItem(IDC_BUTTON_JIEPING))->LoadBitmaps(IDB_BITMAP_JIEPING);
((CBitmapButton*)GetDlgItem(IDC_BUTTON_JIEPING))->Invalidate(true);
((CBitmapButton*)GetDlgItem(IDC_BUTTON_JIEPING))->SizeToContent();