這是我用的函式


但是顯現出來總是偏左,是怎么回事呢?請問要怎么解決?
或者有其他方法能在按鈕上動態加載BMP圖片嗎?
uj5u.com熱心網友回復:
CStatic + CImage 實作簡單的圖片顯示控制元件uj5u.com熱心網友回復:
1. 把按鈕上的字設定為空2. 對齊方式設定為居中對齊(默認應該就是居中對齊)
uj5u.com熱心網友回復:
使用 picture 控制元件( CStaric)代替 按鈕uj5u.com熱心網友回復:
CButton::SetBitmapHBITMAP SetBitmap( HBITMAP hBitmap );
Return Value
The handle of a bitmap previously associated with the button.
Parameters
hBitmap
The handle of a bitmap.
Remarks
Call this member function to associate a new bitmap with the button.
The bitmap will be automatically placed on the face of the button, centered by default. If the bitmap is too large for the button, it will be clipped on either side. You can choose other alignment options, including the following:
BS_TOP
BS_LEFT
BS_RIGHT
BS_CENTER
BS_BOTTOM
BS_VCENTER
Unlike CBitmapButton, which uses four bitmaps per button, SetBitmap uses only one bitmap per the button. When the button is pressed, the bitmap appears to shift down and to the right.
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/40482.html
標籤:基礎類
下一篇:多執行緒死鎖問題求助
