Results 1 to 2 of 2

Thread: CButton and graphic

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    50

    CButton and graphic

    how can i create button (using MFC CButton) with picture on it ?

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    To put a picture on a button: (MFC)
    Code:
    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_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.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width