Home > Software engineering >  MFC display images to solve!!!!!!
MFC display images to solve!!!!!!

Time:09-16

This is a function of I use
But appeared always to the left, how be to return a responsibility? Excuse me how should solve?

Or there are other ways to dynamic loading BMP image on the button?

CodePudding user response:

CStatic + CImage implement a simple picture display control


CodePudding user response:

1. Put the words on the button is set to the empty
2. Alignment is set to align center (the default should be center aligned)

CodePudding user response:

Use the picture (CStaric) instead of a button control

CodePudding user response:

CButton: : SetBitmap
HBITMAP SetBitmap (HBITMAP HBITMAP);

The Return Value

The handle of a bitmap previously associated with The button.

The Parameters

HBitmap

The handle of a bitmap.

Few

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, o 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.

  • Related