CButton
-
Hallo,
mit dem Code aus der FAQ war es ja kein Problem eine Bitmap auf den Button zu bringen.
Nun hab ich aber die Größe der Buttons im Dialog verkleinert. Er passt mir aber die Größe der Bitmaps nicht darauf an. D.h. ich sehe auf dem Button nur noch 75 % der ehemaligen Bitmap. Ich hab die Resourcen schon neu kompiliert, die Bitmap rausgenommen und wieder neu eingefügt. Kein Erfolg.
Was kann da noch helfen?
-
Hallo,
inder Regel hast Du bei der Init des Buttons auch die Größenangabe noch mit drin. Z.B.
b_start.SetBitmap(IDR_START,16,16);
Dann kannst Du die Größe des Bitmaps ändern.
Gruß
Ocrana
-
Hi,
setbitmap will nur 1 Parameter.
Aber vielleicht kannst du mir das mal in Code umsetzen?!?
CButton::SetBitmap
HBITMAP 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_VCENTERIch nehme an ich brauch BS_Center.
Bitte mal ergänzen :
m_button.SetBitmap(m_button1bitmap);Thanks