如果想使CButton支持显示位图或者是图标,必须在create中添加样式 BS_BITMAP 或者 BS_ICON , 代码如下: m_btn = new CButton; RECT rect = {200,200,245,245}; m_btn->Create("",BS_DEFPUSHBUTTON|WS_VISIBLE|WS_CHILD|BS_BITMAP,rect,this,2309); HBITMAP h = (HBITMAP )LoadImage(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP1),IMAGE_BITMAP,45,45,0); m_btn->SetBitmap(h); 如果使用的是 CBitmapButton 必须要在style里添加 BS_OWNERDRAW ,代码如下: RECT rect = {0,0,40,40}; CBitmapButton * btn = new CBitmapButton; btn->Create("播放",BS_DEFPUSHBUTTON|WS_VISIBLE|WS_CHILD|BS_OWNERDRAW,rect,this,2001); HBITMAP h = (HBITMAP )LoadImage(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP_PLAY),IMAGE_BITMAP,45,45,0); btn->LoadBitmaps(IDB_BITMAP1,IDB_BITMAP2,IDB_BITMAP3,IDB_BITMAP4); btn->SizeToContent();