Public Member Functions

# wxStaticBitmap Class Reference
[Controls]

`#include <wx/statbmp.h>`

Inheritance diagram for wxStaticBitmap:
[legend]

## Detailed Description

A static bitmap control displays a bitmap.

Native implementations on some platforms are only meant for display of the small icons in the dialog boxes. In particular, under Windows 9x the size of bitmap is limited to 64*64 pixels.

If you want to display larger images portably, you may use generic implementation wxGenericStaticBitmap declared in <wx/generic/statbmpg.h>.

##

Library: wxCore
Category: Controls
Appearance:

wxMSW appearance | wxGTK appearance | wxMac appearance

See also:
  wxStaticBitmap, wxStaticBox

## Public Member Functions
| wxStaticBitmap ()
| Default constructor.
| wxStaticBitmap (wxWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxStaticBitmapNameStr)
| Constructor, creating and showing a static bitmap control.
bool | Create (wxWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxStaticBitmapNameStr)
| Creation function, for two-step construction.
virtual wxBitmap | GetBitmap () const
| Returns the bitmap currently used in the control.
virtual wxIcon | GetIcon () const
| Returns the icon currently used in the control.
virtual void | SetBitmap (const wxBitmap &label)
| Sets the bitmap label.
virtual void | SetIcon (const wxIcon &label)
| Sets the label to the given icon.

List of all members.

## Constructor & Destructor Documentation

wxStaticBitmap::wxStaticBitmap | ( |  | ) |

Default constructor.

wxStaticBitmap::wxStaticBitmap | ( | wxWindow * | parent,
|  | wxWindowID | id,
|  | const wxBitmap & | label,
|  | const wxPoint & | pos = `wxDefaultPosition`,
|  | const wxSize & | size = `wxDefaultSize`,
|  | long | style = `0`,
|  | const wxString & | name = `wxStaticBitmapNameStr` |
| ) |  |  |

Constructor, creating and showing a static bitmap control.

Parameters:

  | parent | Parent window. Should not be NULL.
  | id | Control identifier. A value of -1 denotes a default value.
  | label | Bitmap label.
  | pos | Window position.
  | size | Window size.
  | style | Window style. See wxStaticBitmap.
  | name | Window name.

See also:
  Create()

## Member Function Documentation

bool wxStaticBitmap::Create | ( | wxWindow * | parent,
|  | wxWindowID | id,
|  | const wxBitmap & | label,
|  | const wxPoint & | pos = `wxDefaultPosition`,
|  | const wxSize & | size = `wxDefaultSize`,
|  | long | style = `0`,
|  | const wxString & | name = `wxStaticBitmapNameStr` |
| ) |  |  |

Creation function, for two-step construction.

For details see wxStaticBitmap().

virtual wxBitmap wxStaticBitmap::GetBitmap | ( |  | ) | const`[virtual]`

Returns the bitmap currently used in the control.

Notice that this method can be called even if SetIcon() had been used.

See also:
  SetBitmap()

virtual wxIcon wxStaticBitmap::GetIcon | ( |  | ) | const`[virtual]`

Returns the icon currently used in the control.

Notice that this method can only be called if SetIcon() had been used: an icon can't be retrieved from the control if a bitmap had been set (using wxStaticBitmap::SetBitmap).

See also:
  SetIcon()

virtual void wxStaticBitmap::SetBitmap | ( | const wxBitmap & | label | ) | `[virtual]`

Sets the bitmap label.

Parameters:

  | label | The new bitmap.

See also:
  GetBitmap()

virtual void wxStaticBitmap::SetIcon | ( | const wxIcon & | label | ) | `[virtual]`

Sets the label to the given icon.

Parameters:

  | label | The new icon.

|  | [ top ]