在SDK下,如何做位图按钮

解决方案 »

  1.   

    用自画风格就可以,相应WM_DRAWITEM消息
      

  2.   

    BM_SETIMAGE
    An application sends a BM_SETIMAGE message to associate a new image (icon or bitmap) with the button.To send this message, call the SendMessage function with the following parameters. SendMessage( 
      (HWND) hWnd,              // handle to destination window 
      BM_SETIMAGE,              // message to send
      (WPARAM) wParam,          // image type
      (LPARAM) lParam          // handle to the image (HANDLE)
    );
    Parameters
    wParam 
    Specifies the type of image to associate with the button. This parameter can be one of the following values: 
    IMAGE_BITMAP
    IMAGE_ICON lParam 
    Handle to the image to associate with the button. 
    Return Values
    The return value is a handle to the image previously associated with the button, if any; otherwise, it is NULL.Res
    Requirements 
      Windows NT/2000: Requires Windows NT 4.0 or later.
      Windows 95/98: Requires Windows 95 or later.
      Header: Declared in Winuser.h; include Windows.h.See Also
    Buttons Overview, Button Messages, BM_GETIMAGE