Graphic button BitmapButton

xiaoxiao2021-03-06  100

Add a Button control, select its OwnerDraw and Bitmap properties, add a variable BTN for that control in ClassWizard, the variable type is Control, after confirming, change the type of BTN to cBitmapButton in the header file, import two pictures as you Two states (Press and Non-Pressing), defined as IDB_bitmap1 and idb_bitmap2, add statements in the OnInitDialog () function of the main dialog: (cbitmapButton *) getdlgitem (idc_button_exit) -> loadingbitmaps (idb_bitmap1 , IDB_bitmap2);

转载请注明原文地址:https://www.9cbs.com/read-105066.html

New Post(0)