File: group__group__funcmacro__gdi.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (566 lines) | stat: -rw-r--r-- 37,879 bytes parent folder | download | duplicates (2)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: Graphics Device Interface (GDI)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
 <tbody>
 <tr>
  <td id="projectlogo">
    <a href="http://www.wxwidgets.org/" target="_new">
      <img alt="wxWidgets" src="logo.png"/>
    </a>
  </td>
  <td style="padding-left: 0.5em; text-align: right;">
   <span id="projectnumber">Version: 3.0.2</span>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Categories</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Graphics Device Interface (GDI)</div>  </div>
<div class="ingroups"><a class="el" href="group__group__funcmacro.html">Functions and Macros by Category</a></div></div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The following are functions and macros related to GDI (Graphics Device Interface) access. </p>
<p>Related Overviews: <a class="el" href="overview_dc.html">Device Contexts</a></p>
<p>Related class group: <a class="el" href="group__group__class__gdi.html">Graphics Device Interface (GDI)</a> </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gafd3af54dd770553f30cfde5971c0cce4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#gafd3af54dd770553f30cfde5971c0cce4">wxDROP_ICON</a>(name)</td></tr>
<tr class="memdesc:gafd3af54dd770553f30cfde5971c0cce4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro creates either a cursor (MSW) or an icon (elsewhere) with the given <em>name</em> (of type <code>const char*</code>).  <a href="#gafd3af54dd770553f30cfde5971c0cce4"></a><br/></td></tr>
<tr class="separator:gafd3af54dd770553f30cfde5971c0cce4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga309f860d17c1a8c4cc54c6e772a2fd09"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga309f860d17c1a8c4cc54c6e772a2fd09">wxBITMAP</a>(bitmapName)</td></tr>
<tr class="memdesc:ga309f860d17c1a8c4cc54c6e772a2fd09"><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro loads a bitmap from either application resources (on the platforms for which they exist, i.e.  <a href="#ga309f860d17c1a8c4cc54c6e772a2fd09"></a><br/></td></tr>
<tr class="separator:ga309f860d17c1a8c4cc54c6e772a2fd09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga30fc362d22b3045f58aed54fc808f203"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga30fc362d22b3045f58aed54fc808f203">wxBITMAP_PNG</a>(bitmapName)</td></tr>
<tr class="memdesc:ga30fc362d22b3045f58aed54fc808f203"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a bitmap from either application resources or embedded image data in PNG format.  <a href="#ga30fc362d22b3045f58aed54fc808f203"></a><br/></td></tr>
<tr class="separator:ga30fc362d22b3045f58aed54fc808f203"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9eaa3cc84338a358ba0d0292bc67daaa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga9eaa3cc84338a358ba0d0292bc67daaa">wxBITMAP_PNG_FROM_DATA</a>(bitmapName)</td></tr>
<tr class="memdesc:ga9eaa3cc84338a358ba0d0292bc67daaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a bitmap from embedded image data in PNG format.  <a href="#ga9eaa3cc84338a358ba0d0292bc67daaa"></a><br/></td></tr>
<tr class="separator:ga9eaa3cc84338a358ba0d0292bc67daaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f22eefa44998cbeb8f018978cf5d375"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga1f22eefa44998cbeb8f018978cf5d375">wxICON</a>(iconName)</td></tr>
<tr class="memdesc:ga1f22eefa44998cbeb8f018978cf5d375"><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro loads an icon from either application resources (on the platforms for which they exist, i.e.  <a href="#ga1f22eefa44998cbeb8f018978cf5d375"></a><br/></td></tr>
<tr class="separator:ga1f22eefa44998cbeb8f018978cf5d375"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga8470515f9717f1cd01cf33d8e246b9a1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga8470515f9717f1cd01cf33d8e246b9a1">wxIsDragResultOk</a> (<a class="el" href="interface_2wx_2dnd_8h.html#adbd4b292582eebbc9a6ce3dee31c2afb">wxDragResult</a> res)</td></tr>
<tr class="memdesc:ga8470515f9717f1cd01cf33d8e246b9a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if res indicates that something was done during a DnD operation, i.e.  <a href="#ga8470515f9717f1cd01cf33d8e246b9a1"></a><br/></td></tr>
<tr class="separator:ga8470515f9717f1cd01cf33d8e246b9a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34f344a392be6c1db5c0af45998b5fc3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga34f344a392be6c1db5c0af45998b5fc3">wxColourDisplay</a> ()</td></tr>
<tr class="memdesc:ga34f344a392be6c1db5c0af45998b5fc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <span class="literal">true</span> if the display is colour, <span class="literal">false</span> otherwise.  <a href="#ga34f344a392be6c1db5c0af45998b5fc3"></a><br/></td></tr>
<tr class="separator:ga34f344a392be6c1db5c0af45998b5fc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa144903f36a28751aa9b80b3b5f804ba"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#gaa144903f36a28751aa9b80b3b5f804ba">wxDisplayDepth</a> ()</td></tr>
<tr class="memdesc:gaa144903f36a28751aa9b80b3b5f804ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the depth of the display (a value of 1 denotes a monochrome display).  <a href="#gaa144903f36a28751aa9b80b3b5f804ba"></a><br/></td></tr>
<tr class="separator:gaa144903f36a28751aa9b80b3b5f804ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga04d90db090918ad96448b5603d89617b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga04d90db090918ad96448b5603d89617b">wxSetCursor</a> (const <a class="el" href="classwx_cursor.html">wxCursor</a> &amp;cursor)</td></tr>
<tr class="memdesc:ga04d90db090918ad96448b5603d89617b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Globally sets the cursor; only has an effect on Windows, Mac and GTK+.  <a href="#ga04d90db090918ad96448b5603d89617b"></a><br/></td></tr>
<tr class="separator:ga04d90db090918ad96448b5603d89617b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab8a48ec2fc13c5112ff5fcd42e2881b9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#gab8a48ec2fc13c5112ff5fcd42e2881b9">wxClientDisplayRect</a> (int *x, int *y, int *width, int *height)</td></tr>
<tr class="memdesc:gab8a48ec2fc13c5112ff5fcd42e2881b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the dimensions of the work area on the display.  <a href="#gab8a48ec2fc13c5112ff5fcd42e2881b9"></a><br/></td></tr>
<tr class="separator:gab8a48ec2fc13c5112ff5fcd42e2881b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad087254ad6626958b5e4907e909bcd8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_rect.html">wxRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#gad087254ad6626958b5e4907e909bcd8d">wxGetClientDisplayRect</a> ()</td></tr>
<tr class="memdesc:gad087254ad6626958b5e4907e909bcd8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the dimensions of the work area on the display.  <a href="#gad087254ad6626958b5e4907e909bcd8d"></a><br/></td></tr>
<tr class="separator:gad087254ad6626958b5e4907e909bcd8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga84d60564b0cd90909000b53eba457cfa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_size.html">wxSize</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga84d60564b0cd90909000b53eba457cfa">wxGetDisplayPPI</a> ()</td></tr>
<tr class="memdesc:ga84d60564b0cd90909000b53eba457cfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the display resolution in pixels per inch.  <a href="#ga84d60564b0cd90909000b53eba457cfa"></a><br/></td></tr>
<tr class="separator:ga84d60564b0cd90909000b53eba457cfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2a4dcac2c18c10f546e699ddba2fbfc8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga2a4dcac2c18c10f546e699ddba2fbfc8">wxDisplaySize</a> (int *width, int *height)</td></tr>
<tr class="memdesc:ga2a4dcac2c18c10f546e699ddba2fbfc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the display size in pixels.  <a href="#ga2a4dcac2c18c10f546e699ddba2fbfc8"></a><br/></td></tr>
<tr class="separator:ga2a4dcac2c18c10f546e699ddba2fbfc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaefd6b970b2fa62bfc00f386da06ab286"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_size.html">wxSize</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#gaefd6b970b2fa62bfc00f386da06ab286">wxGetDisplaySize</a> ()</td></tr>
<tr class="memdesc:gaefd6b970b2fa62bfc00f386da06ab286"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the display size in pixels.  <a href="#gaefd6b970b2fa62bfc00f386da06ab286"></a><br/></td></tr>
<tr class="separator:gaefd6b970b2fa62bfc00f386da06ab286"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga964bb139750337d8e578450f88b6e97b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga964bb139750337d8e578450f88b6e97b">wxDisplaySizeMM</a> (int *width, int *height)</td></tr>
<tr class="memdesc:ga964bb139750337d8e578450f88b6e97b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the display size in millimeters.  <a href="#ga964bb139750337d8e578450f88b6e97b"></a><br/></td></tr>
<tr class="separator:ga964bb139750337d8e578450f88b6e97b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3ff3369f130a82b6b0fc2c021d9b800e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_size.html">wxSize</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#ga3ff3369f130a82b6b0fc2c021d9b800e">wxGetDisplaySizeMM</a> ()</td></tr>
<tr class="memdesc:ga3ff3369f130a82b6b0fc2c021d9b800e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the display size in millimeters.  <a href="#ga3ff3369f130a82b6b0fc2c021d9b800e"></a><br/></td></tr>
<tr class="separator:ga3ff3369f130a82b6b0fc2c021d9b800e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab1948435f8ba3c1cac214e6599595c4f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__gdi.html#gab1948435f8ba3c1cac214e6599595c4f">wxMakeMetafilePlaceable</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;filename, int minX, int minY, int maxX, int maxY, float scale=1.0)</td></tr>
<tr class="memdesc:gab1948435f8ba3c1cac214e6599595c4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a filename for an existing, valid metafile (as constructed using <a class="el" href="classwx_metafile_d_c.html" title="This is a type of device context that allows a metafile object to be created (Windows only)...">wxMetafileDC</a>) makes it into a placeable metafile by prepending a header containing the given bounding box.  <a href="#gab1948435f8ba3c1cac214e6599595c4f"></a><br/></td></tr>
<tr class="separator:gab1948435f8ba3c1cac214e6599595c4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga309f860d17c1a8c4cc54c6e772a2fd09"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxBITMAP</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bitmapName</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This macro loads a bitmap from either application resources (on the platforms for which they exist, i.e. </p>
<p>Windows and OS2) or from an XPM file. This can help to avoid using <span class="literal">#ifdef</span> when creating bitmaps.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_bitmap.html">Bitmaps and Icons</a>, <a class="el" href="group__group__funcmacro__gdi.html#ga1f22eefa44998cbeb8f018978cf5d375" title="This macro loads an icon from either application resources (on the platforms for which they exist...">wxICON()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga30fc362d22b3045f58aed54fc808f203"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxBITMAP_PNG</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bitmapName</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a bitmap from either application resources or embedded image data in PNG format. </p>
<p>This macro is similar to <a class="el" href="group__group__funcmacro__gdi.html#ga309f860d17c1a8c4cc54c6e772a2fd09" title="This macro loads a bitmap from either application resources (on the platforms for which they exist...">wxBITMAP()</a> but works with bitmap data in PNG format and not BMP or XPM.</p>
<p>Under Windows the given <em>bitmapName</em> must be present in the application resource file with the type <code>RCDATA</code> and refer to a PNG image. I.e. you should have a definition similar to the following in your <code></code>.rc file: </p>
<div class="fragment"><div class="line">mybitmap    RCDATA  <span class="stringliteral">&quot;mybitmap.png&quot;</span></div>
</div><!-- fragment --><p> to be able to use <code><a class="el" href="group__group__funcmacro__gdi.html#ga30fc362d22b3045f58aed54fc808f203" title="Creates a bitmap from either application resources or embedded image data in PNG format.">wxBITMAP_PNG(mybitmap)</a></code> in the code.</p>
<p>Under OS X the file with the specified name and "png" extension must be present in the "Resources" subdirectory of the application bundle.</p>
<p>Under the other platforms, this is equivalent to <a class="el" href="group__group__funcmacro__gdi.html#ga9eaa3cc84338a358ba0d0292bc67daaa" title="Creates a bitmap from embedded image data in PNG format.">wxBITMAP_PNG_FROM_DATA()</a> and so loads the image data from the array called <code>bitmapName_png</code> that must exist. Notice that it <em>must</em> be an array and not a pointer as the macro needs to be able to determine its size. Such an array can be produced by a number of conversion programs. A very simple one is included in wxWidgets distribution as <code>misc/scripts/png2c.py</code>.</p>
<p>Finally notice that you must register PNG image handler to be able to load bitmaps from PNG data. This can be done either by calling <a class="el" href="group__group__funcmacro__appinitterm.html#ga27f6c78d5d13374a28022b7bd44c6823" title="Initializes all available image handlers.">wxInitAllImageHandlers()</a> which also registers all the other image formats or including the necessary header: </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;wx/imagpng.h&gt;</span></div>
</div><!-- fragment --><p> and calling </p>
<div class="fragment"><div class="line"><a class="code" href="classwx_image.html#ab39fb3747dfb8c2d444eff9fe41fa205" title="Register an image handler.">wxImage::AddHandler</a>(<span class="keyword">new</span> wxPNGHandler);</div>
</div><!-- fragment --><p> in your application startup code.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__gdi.html#ga9eaa3cc84338a358ba0d0292bc67daaa" title="Creates a bitmap from embedded image data in PNG format.">wxBITMAP_PNG_FROM_DATA()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre><dl class="section since"><dt>Since</dt><dd>2.9.5 </dd></dl>

</div>
</div>
<a class="anchor" id="ga9eaa3cc84338a358ba0d0292bc67daaa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxBITMAP_PNG_FROM_DATA</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bitmapName</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a bitmap from embedded image data in PNG format. </p>
<p>This macro is a thin wrapper around <a class="el" href="classwx_bitmap.html#a2048897970d5e845040fcfc0259e1be1" title="Loads a bitmap from the memory containing image data in PNG format.">wxBitmap::NewFromPNGData()</a> and takes just the base name of the array containing the image data and computes its size internally. In other words, the array called <code>bitmapName_png</code> must exist. Notice that it <em>must</em> be an array and not a pointer as the macro needs to be able to determine its size. Such an array can be produced by a number of conversion programs. A very simple one is included in wxWidgets distribution as <code>misc/scripts/png2c.py</code>.</p>
<p>You can use <a class="el" href="group__group__funcmacro__gdi.html#ga30fc362d22b3045f58aed54fc808f203" title="Creates a bitmap from either application resources or embedded image data in PNG format.">wxBITMAP_PNG()</a> to load the PNG bitmaps from resources on the platforms that support this and only fall back to loading them from data under the other ones (i.e. not Windows and not OS X).</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre><dl class="section since"><dt>Since</dt><dd>2.9.5 </dd></dl>

</div>
</div>
<a class="anchor" id="gafd3af54dd770553f30cfde5971c0cce4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxDROP_ICON</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This macro creates either a cursor (MSW) or an icon (elsewhere) with the given <em>name</em> (of type <code>const char*</code>). </p>
<p>Under MSW, the cursor is loaded from the resource file and the icon is loaded from XPM file under other platforms.</p>
<p>This macro should be used with <a class="el" href="classwx_drop_source.html#a0534684be549317b7a14ce27d5afc699" title="This constructor requires that you must call SetData() later.">wxDropSource::wxDropSource()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classwx_cursor.html" title="A cursor is a small bitmap usually used for denoting where the mouse pointer is, with a picture that ...">wxCursor</a> on MSW, otherwise returns a <a class="el" href="classwx_icon.html" title="An icon is a small rectangular bitmap usually used for denoting a minimized application.">wxIcon</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/dnd.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga1f22eefa44998cbeb8f018978cf5d375"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxICON</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">iconName</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This macro loads an icon from either application resources (on the platforms for which they exist, i.e. </p>
<p>Windows and OS2) or from an XPM file. This can help to avoid using <span class="literal">#ifdef</span> when creating icons.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_bitmap.html">Bitmaps and Icons</a>, <a class="el" href="group__group__funcmacro__gdi.html#ga309f860d17c1a8c4cc54c6e772a2fd09" title="This macro loads a bitmap from either application resources (on the platforms for which they exist...">wxBITMAP()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gab8a48ec2fc13c5112ff5fcd42e2881b9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxClientDisplayRect </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the dimensions of the work area on the display. </p>
<p>This is the same as <a class="el" href="group__group__funcmacro__gdi.html#gad087254ad6626958b5e4907e909bcd8d" title="Returns the dimensions of the work area on the display.">wxGetClientDisplayRect()</a> but allows to retrieve the individual components instead of the entire rectangle.</p>
<p>Any of the output pointers can be <span class="literal">NULL</span> if the corresponding value is not needed by the caller.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_display.html" title="Determines the sizes and locations of displays connected to the system.">wxDisplay</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga34f344a392be6c1db5c0af45998b5fc3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxColourDisplay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns <span class="literal">true</span> if the display is colour, <span class="literal">false</span> otherwise. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="gaa144903f36a28751aa9b80b3b5f804ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wxDisplayDepth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the depth of the display (a value of 1 denotes a monochrome display). </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga2a4dcac2c18c10f546e699ddba2fbfc8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxDisplaySize </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the display size in pixels. </p>
<p>Either of output pointers can be <span class="literal">NULL</span> if the caller is not interested in the corresponding value.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__gdi.html#gaefd6b970b2fa62bfc00f386da06ab286" title="Returns the display size in pixels.">wxGetDisplaySize()</a>, <a class="el" href="classwx_display.html" title="Determines the sizes and locations of displays connected to the system.">wxDisplay</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga964bb139750337d8e578450f88b6e97b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxDisplaySizeMM </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the display size in millimeters. </p>
<p>Either of output pointers can be <span class="literal">NULL</span> if the caller is not interested in the corresponding value.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__gdi.html#ga3ff3369f130a82b6b0fc2c021d9b800e" title="Returns the display size in millimeters.">wxGetDisplaySizeMM()</a>, <a class="el" href="classwx_display.html" title="Determines the sizes and locations of displays connected to the system.">wxDisplay</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="gad087254ad6626958b5e4907e909bcd8d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_rect.html">wxRect</a> wxGetClientDisplayRect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the dimensions of the work area on the display. </p>
<p>On Windows this means the area not covered by the taskbar, etc. Other platforms are currently defaulting to the whole display until a way is found to provide this info for all window managers, etc.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_display.html" title="Determines the sizes and locations of displays connected to the system.">wxDisplay</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga84d60564b0cd90909000b53eba457cfa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_size.html">wxSize</a> wxGetDisplayPPI </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the display resolution in pixels per inch. </p>
<p>The <code>x</code> component of the returned <a class="el" href="classwx_size.html" title="A wxSize is a useful data structure for graphics operations.">wxSize</a> object contains the horizontal resolution and the <code>y</code> one &ndash; the vertical resolution.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre><dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_display.html" title="Determines the sizes and locations of displays connected to the system.">wxDisplay</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>2.9.0 </dd></dl>

</div>
</div>
<a class="anchor" id="gaefd6b970b2fa62bfc00f386da06ab286"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_size.html">wxSize</a> wxGetDisplaySize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the display size in pixels. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_display.html" title="Determines the sizes and locations of displays connected to the system.">wxDisplay</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga3ff3369f130a82b6b0fc2c021d9b800e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_size.html">wxSize</a> wxGetDisplaySizeMM </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the display size in millimeters. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_display.html" title="Determines the sizes and locations of displays connected to the system.">wxDisplay</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga8470515f9717f1cd01cf33d8e246b9a1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxIsDragResultOk </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interface_2wx_2dnd_8h.html#adbd4b292582eebbc9a6ce3dee31c2afb">wxDragResult</a>&#160;</td>
          <td class="paramname"><em>res</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns true if res indicates that something was done during a DnD operation, i.e. </p>
<p>is neither error nor none nor cancel. </p>

</div>
</div>
<a class="anchor" id="gab1948435f8ba3c1cac214e6599595c4f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxMakeMetafilePlaceable </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>minX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>minY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>scale</em> = <code>1.0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Given a filename for an existing, valid metafile (as constructed using <a class="el" href="classwx_metafile_d_c.html" title="This is a type of device context that allows a metafile object to be created (Windows only)...">wxMetafileDC</a>) makes it into a placeable metafile by prepending a header containing the given bounding box. </p>
<p>The bounding box may be obtained from a device context after drawing into it, using the functions <a class="el" href="classwx_d_c.html#a603de4a911be9500e5eb5ffda87750bc" title="Gets the minimum horizontal extent used in drawing commands so far.">wxDC::MinX()</a>, <a class="el" href="classwx_d_c.html#aecfe126a0ebb9818f1b3abf43675e744" title="Gets the minimum vertical extent used in drawing commands so far.">wxDC::MinY()</a>, <a class="el" href="classwx_d_c.html#a8829696c6ebabed7053f8a9479fabeef" title="Gets the maximum horizontal extent used in drawing commands so far.">wxDC::MaxX()</a> and <a class="el" href="classwx_d_c.html#a90b1bc13bd01e442754e91935a8d0ef3" title="Gets the maximum vertical extent used in drawing commands so far.">wxDC::MaxY()</a>.</p>
<p>In addition to adding the placeable metafile header, this function adds the equivalent of the following code to the start of the metafile data:</p>
<div class="fragment"><div class="line">SetMapMode(dc, MM_ANISOTROPIC);</div>
<div class="line">SetWindowOrg(dc, minX, minY);</div>
<div class="line">SetWindowExt(dc, maxX - minX, maxY - minY);</div>
</div><!-- fragment --><p>This simulates the wxMM_TEXT mapping mode, which wxWidgets assumes.</p>
<p>Placeable metafiles may be imported by many Windows applications, and can be used in RTF (Rich Text Format) files.</p>
<p><em>scale</em> allows the specification of scale for the metafile.</p>
<p>This function is only available under Windows.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/metafile.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga04d90db090918ad96448b5603d89617b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxSetCursor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_cursor.html">wxCursor</a> &amp;&#160;</td>
          <td class="paramname"><em>cursor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Globally sets the cursor; only has an effect on Windows, Mac and GTK+. </p>
<p>You should call this function with wxNullCursor to restore the system cursor.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_cursor.html" title="A cursor is a small bitmap usually used for denoting where the mouse pointer is, with a picture that ...">wxCursor</a>, <a class="el" href="classwx_window.html#ad83f9c51c6f31e0e05f598b47a19ed98" title="Sets the window&#39;s cursor.">wxWindow::SetCursor()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/gdicmn.h&gt; </pre> 
</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:43 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
	</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>