File: wx32.htm

package info (click to toggle)
wxwin2-doc 2.01-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,540 kB
  • ctags: 5,968
  • sloc: cpp: 15,157; makefile: 434; sh: 6
file content (684 lines) | stat: -rw-r--r-- 21,129 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
<HTML>
<head><title>wxBitmap</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="wxbitmap"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx31.htm#wxbutton"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx33.htm#wxbitmaphandler"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H2>wxBitmap</H2>
<P>
This class encapsulates the concept of a platform-dependent bitmap,
either monochrome or colour.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx107.htm#wxgdiobject">wxGDIObject</A><BR>

<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/bitmap.h&gt;<P>
<B><FONT COLOR="#FF0000">Predefined objects</FONT></B><P>
Objects:<P>
<B>wxNullBitmap</B><P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx284.htm#wxbitmapoverview">wxBitmap overview</A>,
<A HREF="wx284.htm#supportedbitmapformats">supported bitmap file formats</A>,
<A HREF="wx65.htm#wxdcblit">wxDC::Blit</A>,
<A HREF="wx114.htm#wxicon">wxIcon</A>, <A HREF="wx59.htm#wxcursor">wxCursor</A>, <A HREF="wx32.htm#wxbitmap">wxBitmap</A>,
<A HREF="wx137.htm#wxmemorydc">wxMemoryDC</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#wxbitmapconstr">wxBitmap::wxBitmap</A><BR>
<A HREF="#topic49">wxBitmap::~wxBitmap</A><BR>
<A HREF="#wxbitmapaddhandler">wxBitmap::AddHandler</A><BR>
<A HREF="#topic50">wxBitmap::CleanUpHandlers</A><BR>
<A HREF="#topic51">wxBitmap::Create</A><BR>
<A HREF="#topic52">wxBitmap::FindHandler</A><BR>
<A HREF="#topic53">wxBitmap::GetDepth</A><BR>
<A HREF="#topic54">wxBitmap::GetHandlers</A><BR>
<A HREF="#wxbitmapgetheight">wxBitmap::GetHeight</A><BR>
<A HREF="#wxbitmapgetpalette">wxBitmap::GetPalette</A><BR>
<A HREF="#wxbitmapgetmask">wxBitmap::GetMask</A><BR>
<A HREF="#wxbitmapgetwidth">wxBitmap::GetWidth</A><BR>
<A HREF="#topic55">wxBitmap::InitStandardHandlers</A><BR>
<A HREF="#topic56">wxBitmap::InsertHandler</A><BR>
<A HREF="#wxbitmaploadfile">wxBitmap::LoadFile</A><BR>
<A HREF="#wxbitmapok">wxBitmap::Ok</A><BR>
<A HREF="#topic57">wxBitmap::RemoveHandler</A><BR>
<A HREF="#wxbitmapsavefile">wxBitmap::SaveFile</A><BR>
<A HREF="#wxbitmapsetdepth">wxBitmap::SetDepth</A><BR>
<A HREF="#wxbitmapsetheight">wxBitmap::SetHeight</A><BR>
<A HREF="#wxbitmapsetmask">wxBitmap::SetMask</A><BR>
<A HREF="#topic58">wxBitmap::SetOk</A><BR>
<A HREF="#wxbitmapsetpalette">wxBitmap::SetPalette</A><BR>
<A HREF="#topic59">wxBitmap::SetWidth</A><BR>
<A HREF="#topic60">wxBitmap::operator =</A><BR>
<A HREF="#topic61">wxBitmap::operator ==</A><BR>
<A HREF="#topic62">wxBitmap::operator !=</A><BR>
<P>

<HR>
<A NAME="wxbitmapconstr"></A>
<H3>wxBitmap::wxBitmap</H3>
<P>
<B></B> <B>wxBitmap</B>()<P>
Default constructor.<P>
<B></B> <B>wxBitmap</B>(<B>const wxBitmap&amp; </B><I>bitmap</I>)<P>
Copy constructor.<P>
<B></B> <B>wxBitmap</B>(<B>void*</B><I> data</I>, <B>int</B><I> type</I>, <B>int</B><I> width</I>, <B>int</B><I> height</I>, <B>int</B><I> depth = -1</I>)<P>
Creates a bitmap from the given data, which can be of arbitrary type.<P>
<B></B> <B>wxBitmap</B>(<B>const char</B><I> bits[]</I>, <B>int</B><I> width</I>, <B>int</B><I> height</I><BR>

  <B>int</B><I> depth = 1</I>)<P>
Creates a bitmap from an array of bits.<P>
<B></B> <B>wxBitmap</B>(<B>int</B><I> width</I>, <B>int</B><I> height</I>, <B>int</B><I> depth = -1</I>)<P>
Creates a new bitmap.<P>
<B></B> <B>wxBitmap</B>(<B>const char**</B><I> bits</I>)<P>
Creates a bitmap from XPM data.<P>
<B></B> <B>wxBitmap</B>(<B>const wxString&amp; </B><I>name</I>, <B>long</B><I> type</I>)<P>
Loads a bitmap from a file or resource.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>bits</I><UL><UL>
Specifies an array of pixel values.</UL></UL>
<P>
<I>width</I><UL><UL>
Specifies the width of the bitmap.</UL></UL>
<P>
<I>height</I><UL><UL>
Specifies the height of the bitmap.</UL></UL>
<P>
<I>depth</I><UL><UL>
Specifies the depth of the bitmap. If this is omitted, the display depth of the
screen is used.</UL></UL>
<P>
<I>name</I><UL><UL>
This can refer to a resource name under MS Windows, or a filename under MS Windows and X.
Its meaning is determined by the <I>type</I> parameter.</UL></UL>
<P>
<I>type</I><UL><UL>
May be one of the following:<P>


<TABLE>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_BMP</B>
</TD>

<TD VALIGN=TOP>
Load a Windows bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_BMP_RESOURCE</B>
</TD>

<TD VALIGN=TOP>
Load a Windows bitmap from the resource database.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_GIF</B>
</TD>

<TD VALIGN=TOP>
Load a GIF bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_XBM</B>
</TD>

<TD VALIGN=TOP>
Load an X bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_XPM</B>
</TD>

<TD VALIGN=TOP>
Load an XPM bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_RESOURCE</B>
</TD>

<TD VALIGN=TOP>
Load a Windows resource name.
</TD></TR>


</TABLE>
<P>
The validity of these flags depends on the platform and wxWindows configuration.
If all possible wxWindows settings are used, the Windows platform supports BMP file, BMP resource,
XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data, XPM file, and PNG file.
Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
The first form constructs a bitmap object with no data; an assignment or another member function such as Create
or LoadFile must be called subsequently.<P>
The second and third forms provide copy constructors. Note that these do not copy the
bitmap data, but instead a pointer to the data, keeping a reference count. They are therefore
very efficient operations.<P>
The fourth form constructs a bitmap from data whose type and value depends on
the value of the <I>type</I> argument.<P>
The fifth form constructs a (usually monochrome) bitmap from an array of pixel values, under both
X and Windows.<P>
The sixth form constructs a new bitmap.<P>
The seventh form constructs a bitmap from pixmap (XPM) data, if wxWindows has been configured
to incorporate this feature.<P>
To use this constructor, you must first include an XPM file. For
example, assuming that the file <TT>mybitmap.xpm</TT> contains an XPM array
of character pointers called mybitmap:<P>
<PRE>
#include "mybitmap.xpm"

...

wxBitmap *bitmap = new wxBitmap(mybitmap);
</PRE>
The eighth form constructs a bitmap from a file or resource. <I>name</I> can refer
to a resource name under MS Windows, or a filename under MS Windows and X.<P>
Under Windows, <I>type</I> defaults to wxBITMAP_TYPE_BMP_RESOURCE.
Under X, <I>type</I> defaults to wxBITMAP_TYPE_XPM.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx32.htm#wxbitmaploadfile">wxBitmap::LoadFile</A><P>
<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
 Constructors supported by wxPython are:<P>

<UL><UL>

<TABLE>


<TR><TD VALIGN=TOP>
<B>wxBitmap(name, flag)</B>
</TD>

<TD VALIGN=TOP>
Loads a bitmap from a file
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxNoRefBitmap(name, flag)</B>
</TD>

<TD VALIGN=TOP>
This one won't own the
reference, so Python won't call the destructor, this is good for toolbars
and such where the parent will manage the bitmap.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxEmptyBitmap(width, height, depth=-1)</B>
</TD>

<TD VALIGN=TOP>
Creates an
empty bitmap with the given specifications
</TD></TR>


</TABLE>
</UL></UL>

<P>

<HR>
<A NAME="topic49"></A>
<H3>wxBitmap::~wxBitmap</H3>
<P>
<B></B> <B>~wxBitmap</B>()<P>
Destroys the wxBitmap object and possibly the underlying bitmap data.
Because reference counting is used, the bitmap may not actually be
destroyed at this point - only when the reference count is zero will the
data be deleted.<P>
If the application omits to delete the bitmap explicitly, the bitmap will be
destroyed automatically by wxWindows when the application exits.<P>
Do not delete a bitmap that is selected into a memory device context.<P>

<HR>
<A NAME="wxbitmapaddhandler"></A>
<H3>wxBitmap::AddHandler</H3>
<P>
<B>static void</B> <B>AddHandler</B>(<B>wxBitmapHandler*</B><I> handler</I>)<P>
Adds a handler to the end of the static list of format handlers.<P>
<I>handler</I><UL><UL>
A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx33.htm#wxbitmaphandler">wxBitmapHandler</A><P>

<HR>
<A NAME="topic50"></A>
<H3>wxBitmap::CleanUpHandlers</H3>
<P>
<B>static void</B> <B>CleanUpHandlers</B>()<P>
Deletes all bitmap handlers.<P>
This function is called by wxWindows on exit.<P>

<HR>
<A NAME="topic51"></A>
<H3>wxBitmap::Create</H3>
<P>
<B>virtual bool</B> <B>Create</B>(<B>int</B><I> width</I>, <B>int</B><I> height</I>, <B>int</B><I> depth = -1</I>)<P>
Creates a fresh bitmap. If the final argument is omitted, the display depth of
the screen is used.<P>
<B>virtual bool</B> <B>Create</B>(<B>void*</B><I> data</I>, <B>int</B><I> type</I>, <B>int</B><I> width</I>, <B>int</B><I> height</I>, <B>int</B><I> depth = -1</I>)<P>
Creates a bitmap from the given data, which can be of arbitrary type.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>width</I><UL><UL>
The width of the bitmap in pixels.</UL></UL>
<P>
<I>height</I><UL><UL>
The height of the bitmap in pixels.</UL></UL>
<P>
<I>depth</I><UL><UL>
The depth of the bitmap in pixels. If this is -1, the screen depth is used.</UL></UL>
<P>
<I>data</I><UL><UL>
Data whose type depends on the value of <I>type</I>.</UL></UL>
<P>
<I>type</I><UL><UL>
A bitmap type identifier - see <A HREF="wx32.htm#wxbitmapconstr">wxBitmap::wxBitmap</A> for a list
of possible values.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
TRUE if the call succeeded, FALSE otherwise.<P>
<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
The first form works on all platforms. The portability of the second form depends on the
type of data.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx32.htm#wxbitmapconstr">wxBitmap::wxBitmap</A><P>

<HR>
<A NAME="topic52"></A>
<H3>wxBitmap::FindHandler</H3>
<P>
<B>static wxBitmapHandler*</B> <B>FindHandler</B>(<B>const wxString&amp; </B><I>name</I>)<P>
Finds the handler with the given name.<P>
<B>static wxBitmapHandler*</B> <B>FindHandler</B>(<B>const wxString&amp; </B><I>extension</I>, <B>long</B><I> bitmapType</I>)<P>
Finds the handler associated with the given extension and type.<P>
<B>static wxBitmapHandler*</B> <B>FindHandler</B>(<B>long </B><I>bitmapType</I>)<P>
Finds the handler associated with the given bitmap type.<P>
<I>name</I><UL><UL>
The handler name.</UL></UL>
<P>
<I>extension</I><UL><UL>
The file extension, such as "bmp".</UL></UL>
<P>
<I>bitmapType</I><UL><UL>
The bitmap type, such as wxBITMAP_TYPE_BMP.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
A pointer to the handler if found, NULL otherwise.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx33.htm#wxbitmaphandler">wxBitmapHandler</A><P>

<HR>
<A NAME="topic53"></A>
<H3>wxBitmap::GetDepth</H3>
<P>
<B>int</B> <B>GetDepth</B>() <B>const</B><P>
Gets the colour depth of the bitmap. A value of 1 indicates a
monochrome bitmap.<P>

<HR>
<A NAME="topic54"></A>
<H3>wxBitmap::GetHandlers</H3>
<P>
<B>static wxList&amp;</B> <B>GetHandlers</B>()<P>
Returns the static list of bitmap format handlers.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx33.htm#wxbitmaphandler">wxBitmapHandler</A><P>

<HR>
<A NAME="wxbitmapgetheight"></A>
<H3>wxBitmap::GetHeight</H3>
<P>
<B>int</B> <B>GetHeight</B>() <B>const</B><P>
Gets the height of the bitmap in pixels.<P>

<HR>
<A NAME="wxbitmapgetpalette"></A>
<H3>wxBitmap::GetPalette</H3>
<P>
<B>wxPalette*</B> <B>GetPalette</B>() <B>const</B><P>
Gets the associated palette (if any) which may have been loaded from a file
or set for the bitmap.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx165.htm#wxpalette">wxPalette</A><P>

<HR>
<A NAME="wxbitmapgetmask"></A>
<H3>wxBitmap::GetMask</H3>
<P>
<B>wxMask*</B> <B>GetMask</B>() <B>const</B><P>
Gets the associated mask (if any) which may have been loaded from a file
or set for the bitmap.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx32.htm#wxbitmapsetmask">wxBitmap::SetMask</A>, <A HREF="wx133.htm#wxmask">wxMask</A><P>

<HR>
<A NAME="wxbitmapgetwidth"></A>
<H3>wxBitmap::GetWidth</H3>
<P>
<B>int</B> <B>GetWidth</B>() <B>const</B><P>
Gets the width of the bitmap in pixels.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx32.htm#wxbitmapgetheight">wxBitmap::GetHeight</A><P>

<HR>
<A NAME="topic55"></A>
<H3>wxBitmap::InitStandardHandlers</H3>
<P>
<B>static void</B> <B>InitStandardHandlers</B>()<P>
Adds the standard bitmap format handlers, which, depending on wxWindows
configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.<P>
This function is called by wxWindows on startup.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx33.htm#wxbitmaphandler">wxBitmapHandler</A><P>

<HR>
<A NAME="topic56"></A>
<H3>wxBitmap::InsertHandler</H3>
<P>
<B>static void</B> <B>InsertHandler</B>(<B>wxBitmapHandler*</B><I> handler</I>)<P>
Adds a handler at the start of the static list of format handlers.<P>
<I>handler</I><UL><UL>
A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx33.htm#wxbitmaphandler">wxBitmapHandler</A><P>

<HR>
<A NAME="wxbitmaploadfile"></A>
<H3>wxBitmap::LoadFile</H3>
<P>
<B>bool</B> <B>LoadFile</B>(<B>const wxString&amp;</B><I> name</I>, <B>long</B><I> type</I>)<P>
Loads a bitmap from a file or resource.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>name</I><UL><UL>
Either a filename or a Windows resource name.
The meaning of <I>name</I> is determined by the <I>type</I> parameter.</UL></UL>
<P>
<I>type</I><UL><UL>
One of the following values:<P>


<TABLE>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_BMP</B>
</TD>

<TD VALIGN=TOP>
Load a Windows bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_BMP_RESOURCE</B>
</TD>

<TD VALIGN=TOP>
Load a Windows bitmap from the resource database.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_GIF</B>
</TD>

<TD VALIGN=TOP>
Load a GIF bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_XBM</B>
</TD>

<TD VALIGN=TOP>
Load an X bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_XPM</B>
</TD>

<TD VALIGN=TOP>
Load an XPM bitmap file.
</TD></TR>


</TABLE>
<P>
The validity of these flags depends on the platform and wxWindows configuration.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
TRUE if the operation succeeded, FALSE otherwise.<P>
<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
A palette may be associated with the bitmap if one exists (especially for
colour Windows bitmaps), and if the code supports it. You can check
if one has been created by using the <A HREF="wx32.htm#wxbitmapgetpalette">GetPalette</A> member.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx32.htm#wxbitmapsavefile">wxBitmap::SaveFile</A><P>

<HR>
<A NAME="wxbitmapok"></A>
<H3>wxBitmap::Ok</H3>
<P>
<B>bool</B> <B>Ok</B>() <B>const</B><P>
Returns TRUE if bitmap data is present.<P>

<HR>
<A NAME="topic57"></A>
<H3>wxBitmap::RemoveHandler</H3>
<P>
<B>static bool</B> <B>RemoveHandler</B>(<B>const wxString&amp; </B><I>name</I>)<P>
Finds the handler with the given name, and removes it. The handler
is not deleted.<P>
<I>name</I><UL><UL>
The handler name.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
TRUE if the handler was found and removed, FALSE otherwise.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx33.htm#wxbitmaphandler">wxBitmapHandler</A><P>

<HR>
<A NAME="wxbitmapsavefile"></A>
<H3>wxBitmap::SaveFile</H3>
<P>
<B>bool</B> <B>SaveFile</B>(<B>const wxString&amp; </B><I>name</I>, <B>int</B><I> type</I>, <B>wxPalette* </B><I>palette = NULL</I>)<P>
Saves a bitmap in the named file.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>name</I><UL><UL>
A filename. The meaning of <I>name</I> is determined by the <I>type</I> parameter.</UL></UL>
<P>
<I>type</I><UL><UL>
One of the following values:<P>


<TABLE>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_BMP</B>
</TD>

<TD VALIGN=TOP>
Save a Windows bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_GIF</B>
</TD>

<TD VALIGN=TOP>
Save a GIF bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_XBM</B>
</TD>

<TD VALIGN=TOP>
Save an X bitmap file.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxBITMAP_TYPE_XPM</B>
</TD>

<TD VALIGN=TOP>
Save an XPM bitmap file.
</TD></TR>


</TABLE>
<P>
The validity of these flags depends on the platform and wxWindows configuration.</UL></UL>
<P>
<I>palette</I><UL><UL>
An optional palette used for saving the bitmap.</UL></UL>

<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
TRUE if the operation succeeded, FALSE otherwise.<P>
<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
Depending on how wxWindows has been configured, not all formats may be available.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx32.htm#wxbitmaploadfile">wxBitmap::LoadFile</A><P>

<HR>
<A NAME="wxbitmapsetdepth"></A>
<H3>wxBitmap::SetDepth</H3>
<P>
<B>void</B> <B>SetDepth</B>(<B>int </B><I>depth</I>)<P>
Sets the depth member (does not affect the bitmap data).<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>depth</I><UL><UL>
Bitmap depth.</UL></UL>
<P>

<HR>
<A NAME="wxbitmapsetheight"></A>
<H3>wxBitmap::SetHeight</H3>
<P>
<B>void</B> <B>SetHeight</B>(<B>int </B><I>height</I>)<P>
Sets the height member (does not affect the bitmap data).<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>height</I><UL><UL>
Bitmap height in pixels.</UL></UL>
<P>

<HR>
<A NAME="wxbitmapsetmask"></A>
<H3>wxBitmap::SetMask</H3>
<P>
<B>void</B> <B>SetMask</B>(<B>wxMask* </B><I>mask</I>)<P>
Sets the mask for this bitmap.<P>
<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
The bitmap object owns the mask once this has been called.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx32.htm#wxbitmapgetmask">wxBitmap::GetMask</A>, <A HREF="wx133.htm#wxmask">wxMask</A><P>

<HR>
<A NAME="topic58"></A>
<H3>wxBitmap::SetOk</H3>
<P>
<B>void</B> <B>SetOk</B>(<B>int </B><I>isOk</I>)<P>
Sets the validity member (does not affect the bitmap data).<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>isOk</I><UL><UL>
Validity flag.</UL></UL>
<P>

<HR>
<A NAME="wxbitmapsetpalette"></A>
<H3>wxBitmap::SetPalette</H3>
<P>
<B>void</B> <B>SetPalette</B>(<B>wxPalette* </B><I>palette</I>)<P>
Sets the associated palette: it will be deleted in the wxBitmap
destructor, so if you do not wish it to be deleted automatically,
reset the palette to NULL before the bitmap is deleted.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>palette</I><UL><UL>
The palette to set.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
The bitmap object owns the palette once this has been called.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx165.htm#wxpalette">wxPalette</A><P>

<HR>
<A NAME="topic59"></A>
<H3>wxBitmap::SetWidth</H3>
<P>
<B>void</B> <B>SetWidth</B>(<B>int </B><I>width</I>)<P>
Sets the width member (does not affect the bitmap data).<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>width</I><UL><UL>
Bitmap width in pixels.</UL></UL>
<P>

<HR>
<A NAME="topic60"></A>
<H3>wxBitmap::operator =</H3>
<P>
<B>wxBitmap&amp; </B> <B>operator =</B>(<B>const wxBitmap&amp; </B><I>bitmap</I>)<P>
Assignment operator. This operator does not copy any data, but instead
passes a pointer to the data in <I>bitmap</I> and increments a reference
counter. It is a fast operation.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>bitmap</I><UL><UL>
Bitmap to assign.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
Returns 'this' object.<P>

<HR>
<A NAME="topic61"></A>
<H3>wxBitmap::operator ==</H3>
<P>
<B>bool</B> <B>operator ==</B>(<B>const wxBitmap&amp; </B><I>bitmap</I>)<P>
Equality operator. This operator tests whether the internal data pointers are
equal (a fast test).<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>bitmap</I><UL><UL>
Bitmap to compare with 'this'</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
Returns TRUE if the bitmaps were effectively equal, FALSE otherwise.<P>

<HR>
<A NAME="topic62"></A>
<H3>wxBitmap::operator !=</H3>
<P>
<B>bool</B> <B>operator !=</B>(<B>const wxBitmap&amp; </B><I>bitmap</I>)<P>
Inequality operator. This operator tests whether the internal data pointers are
unequal (a fast test).<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>bitmap</I><UL><UL>
Bitmap to compare with 'this'</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
Returns TRUE if the bitmaps were unequal, FALSE otherwise.<P>

</BODY></HTML>