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
|
<!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: Application Initialization and Termination</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 Page</span></a></li>
<li><a href="pages.html"><span>Related 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="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Application Initialization and Termination</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 functions in this section are used on application startup/shutdown and also to control the behaviour of the main event loop of the GUI programs. </p>
<p>Related macros/global-functions group: <a class="el" href="group__group__class__appmanagement.html">Application and Process Management</a>. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gac387a69e740a149f9888e4992a3a4c6c"><td class="memItemLeft" align="right" valign="top">wxAppDerivedClass & </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#gac387a69e740a149f9888e4992a3a4c6c">wxGetApp</a> ()</td></tr>
<tr class="memdesc:gac387a69e740a149f9888e4992a3a4c6c"><td class="mdescLeft"> </td><td class="mdescRight">This function doesn't exist in wxWidgets but it is created by using the <a class="el" href="group__group__funcmacro__rtti.html#ga967aafaa261481fe2d2e1cf599e3e003" title="This is used in the application class implementation file to make the application class known to wxWi...">wxIMPLEMENT_APP()</a> macro. <a href="#gac387a69e740a149f9888e4992a3a4c6c"></a><br/></td></tr>
<tr class="separator:gac387a69e740a149f9888e4992a3a4c6c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga28a4fb827b93fa6bac18c9666c23ee10"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#ga28a4fb827b93fa6bac18c9666c23ee10">wxHandleFatalExceptions</a> (bool doIt=true)</td></tr>
<tr class="memdesc:ga28a4fb827b93fa6bac18c9666c23ee10"><td class="mdescLeft"> </td><td class="mdescRight">If <em>doIt</em> is <span class="literal">true</span>, the fatal exceptions (also known as general protection faults under Windows or segmentation violations in the Unix world) will be caught and passed to <a class="el" href="classwx_app_console.html#a927931aafbb7aec4debdfc02ee6f6f9d" title="This function may be called if something fatal happens: an unhandled exception under Win32 or a fatal...">wxApp::OnFatalException</a>. <a href="#ga28a4fb827b93fa6bac18c9666c23ee10"></a><br/></td></tr>
<tr class="separator:ga28a4fb827b93fa6bac18c9666c23ee10"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa7b284f57a94442126d1e45faca5b4ad"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#gaa7b284f57a94442126d1e45faca5b4ad">wxInitialize</a> ()</td></tr>
<tr class="memdesc:gaa7b284f57a94442126d1e45faca5b4ad"><td class="mdescLeft"> </td><td class="mdescRight">This function is used in wxBase only and only if you don't create <a class="el" href="classwx_app.html" title="The wxApp class represents the application itself when wxUSE_GUI=1.">wxApp</a> object at all. <a href="#gaa7b284f57a94442126d1e45faca5b4ad"></a><br/></td></tr>
<tr class="separator:gaa7b284f57a94442126d1e45faca5b4ad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6aa1674945da924183f65de703aeafa3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#ga6aa1674945da924183f65de703aeafa3">wxUninitialize</a> ()</td></tr>
<tr class="memdesc:ga6aa1674945da924183f65de703aeafa3"><td class="mdescLeft"> </td><td class="mdescRight">This function is for use in console (wxBase) programs only. <a href="#ga6aa1674945da924183f65de703aeafa3"></a><br/></td></tr>
<tr class="separator:ga6aa1674945da924183f65de703aeafa3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga97206743f70b5382f9e2615217604d15"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#ga97206743f70b5382f9e2615217604d15">wxWakeUpIdle</a> ()</td></tr>
<tr class="memdesc:ga97206743f70b5382f9e2615217604d15"><td class="mdescLeft"> </td><td class="mdescRight">This function wakes up the (internal and platform dependent) idle system, i.e. <a href="#ga97206743f70b5382f9e2615217604d15"></a><br/></td></tr>
<tr class="separator:ga97206743f70b5382f9e2615217604d15"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac386c89a04e364afc07edce6d848c27a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#gac386c89a04e364afc07edce6d848c27a">wxYield</a> ()</td></tr>
<tr class="memdesc:gac386c89a04e364afc07edce6d848c27a"><td class="mdescLeft"> </td><td class="mdescRight">Calls <a class="el" href="classwx_app_console.html#a302adeb701f247bf8cac1570efc25020">wxAppConsole::Yield</a>. <a href="#gac386c89a04e364afc07edce6d848c27a"></a><br/></td></tr>
<tr class="separator:gac386c89a04e364afc07edce6d848c27a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga25abb4004fac0bcc0b937d93657c8cba"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#ga25abb4004fac0bcc0b937d93657c8cba">wxSafeYield</a> (<a class="el" href="classwx_window.html">wxWindow</a> *win=NULL, bool onlyIfNeeded=false)</td></tr>
<tr class="memdesc:ga25abb4004fac0bcc0b937d93657c8cba"><td class="mdescLeft"> </td><td class="mdescRight">Calls <a class="el" href="classwx_app.html#a81cc0e2724a7adbc0cc8b0aeeb5a072f" title="This function is similar to wxYield(), except that it disables the user input to all program windows ...">wxApp::SafeYield</a>. <a href="#ga25abb4004fac0bcc0b937d93657c8cba"></a><br/></td></tr>
<tr class="separator:ga25abb4004fac0bcc0b937d93657c8cba"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7d3eefb35631a5d8dfce97eb17340b21"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#ga7d3eefb35631a5d8dfce97eb17340b21">wxEntry</a> (int &argc, <a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> **argv)</td></tr>
<tr class="memdesc:ga7d3eefb35631a5d8dfce97eb17340b21"><td class="mdescLeft"> </td><td class="mdescRight">This function initializes wxWidgets in a platform-dependent way. <a href="#ga7d3eefb35631a5d8dfce97eb17340b21"></a><br/></td></tr>
<tr class="separator:ga7d3eefb35631a5d8dfce97eb17340b21"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga087409a444cb50f75f5819d6d57389af"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#ga087409a444cb50f75f5819d6d57389af">wxEntry</a> (HINSTANCE hInstance, HINSTANCE hPrevInstance=NULL, char *pCmdLine=NULL, int nCmdShow=SW_SHOWNORMAL)</td></tr>
<tr class="memdesc:ga087409a444cb50f75f5819d6d57389af"><td class="mdescLeft"> </td><td class="mdescRight">See <a class="el" href="group__group__funcmacro__appinitterm.html#ga7d3eefb35631a5d8dfce97eb17340b21" title="This function initializes wxWidgets in a platform-dependent way.">wxEntry(int&,wxChar**)</a> for more info about this function. <a href="#ga087409a444cb50f75f5819d6d57389af"></a><br/></td></tr>
<tr class="separator:ga087409a444cb50f75f5819d6d57389af"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga27f6c78d5d13374a28022b7bd44c6823"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#ga27f6c78d5d13374a28022b7bd44c6823">wxInitAllImageHandlers</a> ()</td></tr>
<tr class="memdesc:ga27f6c78d5d13374a28022b7bd44c6823"><td class="mdescLeft"> </td><td class="mdescRight">Initializes all available image handlers. <a href="#ga27f6c78d5d13374a28022b7bd44c6823"></a><br/></td></tr>
<tr class="separator:ga27f6c78d5d13374a28022b7bd44c6823"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac81f7fea72a17cc744d8c8785864c78a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#gac81f7fea72a17cc744d8c8785864c78a">wxEntryStart</a> (int &argc, <a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> **argv)</td></tr>
<tr class="memdesc:gac81f7fea72a17cc744d8c8785864c78a"><td class="mdescLeft"> </td><td class="mdescRight">This function can be used to perform the initialization of wxWidgets if you can't use the default initialization code for any reason. <a href="#gac81f7fea72a17cc744d8c8785864c78a"></a><br/></td></tr>
<tr class="separator:gac81f7fea72a17cc744d8c8785864c78a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gabb589cfa967f83fa867544cd13cd0b53"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#gabb589cfa967f83fa867544cd13cd0b53">wxEntryStart</a> (HINSTANCE hInstance, HINSTANCE hPrevInstance=NULL, char *pCmdLine=NULL, int nCmdShow=SW_SHOWNORMAL)</td></tr>
<tr class="memdesc:gabb589cfa967f83fa867544cd13cd0b53"><td class="mdescLeft"> </td><td class="mdescRight">See <a class="el" href="group__group__funcmacro__appinitterm.html#gac81f7fea72a17cc744d8c8785864c78a" title="This function can be used to perform the initialization of wxWidgets if you can't use the default ini...">wxEntryStart(int&,wxChar**)</a> for more info about this function. <a href="#gabb589cfa967f83fa867544cd13cd0b53"></a><br/></td></tr>
<tr class="separator:gabb589cfa967f83fa867544cd13cd0b53"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaca1c6e45c8241bb2b16bee8f09401bc8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#gaca1c6e45c8241bb2b16bee8f09401bc8">wxEntryCleanup</a> ()</td></tr>
<tr class="memdesc:gaca1c6e45c8241bb2b16bee8f09401bc8"><td class="mdescLeft"> </td><td class="mdescRight">Free resources allocated by a successful call to <a class="el" href="group__group__funcmacro__appinitterm.html#gac81f7fea72a17cc744d8c8785864c78a" title="This function can be used to perform the initialization of wxWidgets if you can't use the default ini...">wxEntryStart()</a>. <a href="#gaca1c6e45c8241bb2b16bee8f09401bc8"></a><br/></td></tr>
<tr class="separator:gaca1c6e45c8241bb2b16bee8f09401bc8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5f7f9359731d567d05c472caabcda979"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__appinitterm.html#ga5f7f9359731d567d05c472caabcda979">wxInitialize</a> (int argc=0, <a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> **argv=NULL)</td></tr>
<tr class="memdesc:ga5f7f9359731d567d05c472caabcda979"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the library (may be called as many times as needed, but each call to <a class="el" href="group__group__funcmacro__appinitterm.html#gaa7b284f57a94442126d1e45faca5b4ad" title="This function is used in wxBase only and only if you don't create wxApp object at all...">wxInitialize()</a> must be matched by <a class="el" href="group__group__funcmacro__appinitterm.html#ga6aa1674945da924183f65de703aeafa3" title="This function is for use in console (wxBase) programs only.">wxUninitialize()</a>). <a href="#ga5f7f9359731d567d05c472caabcda979"></a><br/></td></tr>
<tr class="separator:ga5f7f9359731d567d05c472caabcda979"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga7d3eefb35631a5d8dfce97eb17340b21"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wxEntry </td>
<td>(</td>
<td class="paramtype">int & </td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> ** </td>
<td class="paramname"><em>argv</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function initializes wxWidgets in a platform-dependent way. </p>
<p>Use this if you are not using the default wxWidgets entry code (e.g. main or WinMain).</p>
<p>For example, you can initialize wxWidgets from an Microsoft Foundation Classes (MFC) application using this function.</p>
<dl class="section note"><dt>Note</dt><dd>This overload of wxEntry is available under all platforms.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__appinitterm.html#gac81f7fea72a17cc744d8c8785864c78a" title="This function can be used to perform the initialization of wxWidgets if you can't use the default ini...">wxEntryStart()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include <wx/app.h> </pre>
</div>
</div>
<a class="anchor" id="ga087409a444cb50f75f5819d6d57389af"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wxEntry </td>
<td>(</td>
<td class="paramtype">HINSTANCE </td>
<td class="paramname"><em>hInstance</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">HINSTANCE </td>
<td class="paramname"><em>hPrevInstance</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>pCmdLine</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>nCmdShow</em> = <code>SW_SHOWNORMAL</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>See <a class="el" href="group__group__funcmacro__appinitterm.html#ga7d3eefb35631a5d8dfce97eb17340b21" title="This function initializes wxWidgets in a platform-dependent way.">wxEntry(int&,wxChar**)</a> for more info about this function. </p>
<p>Notice that under Windows CE platform, and only there, the type of <em>pCmdLine</em> is <code>wchar_t</code> *, otherwise it is <code>char</code> *, even in Unicode build.</p>
<dl class="section remark"><dt>Remarks</dt><dd>To clean up wxWidgets, call <a class="el" href="classwx_app_console.html#a5ee60051c92b0b2933258799626a0485" title="Override this member function for any processing which needs to be done as the application is about t...">wxApp::OnExit</a> followed by the static function wxApp::CleanUp. For example, if exiting from an MFC application that also uses wxWidgets: <div class="fragment"><div class="line"><span class="keywordtype">int</span> CTheApp::ExitInstance()</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// OnExit isn't called by CleanUp so must be called explicitly.</span></div>
<div class="line"> <a class="code" href="interface_2wx_2app_8h.html#a01fd2cb0a8fbaade87800e71a50e855d" title="The global pointer to the singleton wxApp object.">wxTheApp</a>-><a class="code" href="classwx_app_console.html#a5ee60051c92b0b2933258799626a0485" title="Override this member function for any processing which needs to be done as the application is about t...">OnExit</a>();</div>
<div class="line"> wxApp::CleanUp();</div>
<div class="line"></div>
<div class="line"> <span class="keywordflow">return</span> CWinApp::ExitInstance();</div>
<div class="line">}</div>
</div><!-- fragment --></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include <wx/app.h> </pre>
</div>
</div>
<a class="anchor" id="gaca1c6e45c8241bb2b16bee8f09401bc8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxEntryCleanup </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free resources allocated by a successful call to <a class="el" href="group__group__funcmacro__appinitterm.html#gac81f7fea72a17cc744d8c8785864c78a" title="This function can be used to perform the initialization of wxWidgets if you can't use the default ini...">wxEntryStart()</a>. </p>
<p>Include file: </p>
<pre class="fragment">#include <wx/init.h> </pre>
</div>
</div>
<a class="anchor" id="gac81f7fea72a17cc744d8c8785864c78a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxEntryStart </td>
<td>(</td>
<td class="paramtype">int & </td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> ** </td>
<td class="paramname"><em>argv</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function can be used to perform the initialization of wxWidgets if you can't use the default initialization code for any reason. </p>
<p>If the function returns true, the initialization was successful and the global <a class="el" href="classwx_app.html" title="The wxApp class represents the application itself when wxUSE_GUI=1.">wxApp</a> object <a class="el" href="interface_2wx_2app_8h.html#a01fd2cb0a8fbaade87800e71a50e855d" title="The global pointer to the singleton wxApp object.">wxTheApp</a> has been created. Moreover, <a class="el" href="group__group__funcmacro__appinitterm.html#gaca1c6e45c8241bb2b16bee8f09401bc8" title="Free resources allocated by a successful call to wxEntryStart().">wxEntryCleanup()</a> must be called afterwards. If the function returns false, a catastrophic initialization error occurred and (at least the GUI part of) the library can't be used at all.</p>
<p>Notice that parameters <code>argc</code> and <code>argv</code> may be modified by this function.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/init.h> </pre>
</div>
</div>
<a class="anchor" id="gabb589cfa967f83fa867544cd13cd0b53"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxEntryStart </td>
<td>(</td>
<td class="paramtype">HINSTANCE </td>
<td class="paramname"><em>hInstance</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">HINSTANCE </td>
<td class="paramname"><em>hPrevInstance</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>pCmdLine</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>nCmdShow</em> = <code>SW_SHOWNORMAL</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>See <a class="el" href="group__group__funcmacro__appinitterm.html#gac81f7fea72a17cc744d8c8785864c78a" title="This function can be used to perform the initialization of wxWidgets if you can't use the default ini...">wxEntryStart(int&,wxChar**)</a> for more info about this function. </p>
<p>This is an additional overload of <a class="el" href="group__group__funcmacro__appinitterm.html#gac81f7fea72a17cc744d8c8785864c78a" title="This function can be used to perform the initialization of wxWidgets if you can't use the default ini...">wxEntryStart()</a> provided under MSW only. It is meant to be called with the parameters passed to WinMain().</p>
<dl class="section note"><dt>Note</dt><dd>Under Windows CE platform, and only there, the type of <em>pCmdLine</em> is <code>wchar_t</code> *, otherwise it is <code>char</code> *, even in Unicode build.</dd></dl>
<div><span class="avail">Availability:</span>  only available for the <a class="el" href="page_port.html#page_port_wxmsw">wxMSW</a> port.</div> <p>Include file: </p>
<pre class="fragment">#include <wx/init.h> </pre>
</div>
</div>
<a class="anchor" id="gac387a69e740a149f9888e4992a3a4c6c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxAppDerivedClass& wxGetApp </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function doesn't exist in wxWidgets but it is created by using the <a class="el" href="group__group__funcmacro__rtti.html#ga967aafaa261481fe2d2e1cf599e3e003" title="This is used in the application class implementation file to make the application class known to wxWi...">wxIMPLEMENT_APP()</a> macro. </p>
<p>Thus, before using it anywhere but in the same module where this macro is used, you must make it available using <a class="el" href="group__group__funcmacro__rtti.html#ga1523a2d553dea288d66cd35e8a0ffd5c" title="This is used in headers to create a forward declaration of the wxGetApp() function implemented by wxI...">wxDECLARE_APP()</a>.</p>
<p>The advantage of using this function compared to directly using the global <a class="el" href="interface_2wx_2app_8h.html#a01fd2cb0a8fbaade87800e71a50e855d" title="The global pointer to the singleton wxApp object.">wxTheApp</a> pointer is that the latter is of type wxApp* and so wouldn't allow you to access the functions specific to your application class but not present in <a class="el" href="classwx_app.html" title="The wxApp class represents the application itself when wxUSE_GUI=1.">wxApp</a> while <a class="el" href="group__group__funcmacro__appinitterm.html#gac387a69e740a149f9888e4992a3a4c6c" title="This function doesn't exist in wxWidgets but it is created by using the wxIMPLEMENT_APP() macro...">wxGetApp()</a> returns the object of the right type.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/app.h> </pre>
</div>
</div>
<a class="anchor" id="ga28a4fb827b93fa6bac18c9666c23ee10"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxHandleFatalExceptions </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>doIt</em> = <code>true</code></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>If <em>doIt</em> is <span class="literal">true</span>, the fatal exceptions (also known as general protection faults under Windows or segmentation violations in the Unix world) will be caught and passed to <a class="el" href="classwx_app_console.html#a927931aafbb7aec4debdfc02ee6f6f9d" title="This function may be called if something fatal happens: an unhandled exception under Win32 or a fatal...">wxApp::OnFatalException</a>. </p>
<p>By default, i.e. before this function is called, they will be handled in the normal way which usually just means that the application will be terminated. Calling <a class="el" href="group__group__funcmacro__appinitterm.html#ga28a4fb827b93fa6bac18c9666c23ee10" title="If doIt is true, the fatal exceptions (also known as general protection faults under Windows or segme...">wxHandleFatalExceptions()</a> with <em>doIt</em> equal to <span class="literal">false</span> will restore this default behaviour.</p>
<p>Notice that this function is only available if <code>wxUSE_ON_FATAL_EXCEPTION</code> is 1 and under Windows platform this requires a compiler with support for SEH (structured exception handling) which currently means only Microsoft Visual C++ or a recent Borland C++ version.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/app.h> </pre>
</div>
</div>
<a class="anchor" id="ga27f6c78d5d13374a28022b7bd44c6823"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxInitAllImageHandlers </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes all available image handlers. </p>
<p>This function calls <a class="el" href="classwx_image.html#ab39fb3747dfb8c2d444eff9fe41fa205" title="Register an image handler.">wxImage::AddHandler()</a> for all the available image handlers (see <a class="el" href="classwx_image.html#image_handlers">Available image handlers</a> for the full list). Calling it is the simplest way to initialize <a class="el" href="classwx_image.html" title="This class encapsulates a platform-independent image.">wxImage</a> but it creates and registers even the handlers your program may not use. If you want to avoid the overhead of doing this you need to call <a class="el" href="classwx_image.html#ab39fb3747dfb8c2d444eff9fe41fa205" title="Register an image handler.">wxImage::AddHandler()</a> manually just for the handlers that you do want to use.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_image.html" title="This class encapsulates a platform-independent image.">wxImage</a>, <a class="el" href="classwx_image_handler.html" title="This is the base class for implementing image file loading/saving, and image creation from data...">wxImageHandler</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include <wx/image.h> </pre>
</div>
</div>
<a class="anchor" id="ga5f7f9359731d567d05c472caabcda979"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxInitialize </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>argc</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> ** </td>
<td class="paramname"><em>argv</em> = <code>NULL</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize the library (may be called as many times as needed, but each call to <a class="el" href="group__group__funcmacro__appinitterm.html#gaa7b284f57a94442126d1e45faca5b4ad" title="This function is used in wxBase only and only if you don't create wxApp object at all...">wxInitialize()</a> must be matched by <a class="el" href="group__group__funcmacro__appinitterm.html#ga6aa1674945da924183f65de703aeafa3" title="This function is for use in console (wxBase) programs only.">wxUninitialize()</a>). </p>
<p>With this function you may avoid <a class="el" href="group__group__funcmacro__rtti.html#ga1523a2d553dea288d66cd35e8a0ffd5c" title="This is used in headers to create a forward declaration of the wxGetApp() function implemented by wxI...">wxDECLARE_APP()</a> and <a class="el" href="group__group__funcmacro__rtti.html#ga967aafaa261481fe2d2e1cf599e3e003" title="This is used in the application class implementation file to make the application class known to wxWi...">wxIMPLEMENT_APP()</a> macros and use <a class="el" href="group__group__funcmacro__appinitterm.html#gaa7b284f57a94442126d1e45faca5b4ad" title="This function is used in wxBase only and only if you don't create wxApp object at all...">wxInitialize()</a> and <a class="el" href="group__group__funcmacro__appinitterm.html#ga6aa1674945da924183f65de703aeafa3" title="This function is for use in console (wxBase) programs only.">wxUninitialize()</a> dynamically in the program startup and termination.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/init.h> </pre>
</div>
</div>
<a class="anchor" id="gaa7b284f57a94442126d1e45faca5b4ad"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxInitialize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function is used in wxBase only and only if you don't create <a class="el" href="classwx_app.html" title="The wxApp class represents the application itself when wxUSE_GUI=1.">wxApp</a> object at all. </p>
<p>In this case you must call it from your <code>main()</code> function before calling any other wxWidgets functions.</p>
<p>If the function returns <span class="literal">false</span> the initialization could not be performed, in this case the library cannot be used and <a class="el" href="group__group__funcmacro__appinitterm.html#ga6aa1674945da924183f65de703aeafa3" title="This function is for use in console (wxBase) programs only.">wxUninitialize()</a> shouldn't be called neither.</p>
<p>This function may be called several times but <a class="el" href="group__group__funcmacro__appinitterm.html#ga6aa1674945da924183f65de703aeafa3" title="This function is for use in console (wxBase) programs only.">wxUninitialize()</a> must be called for each successful call to this function.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/app.h> </pre>
</div>
</div>
<a class="anchor" id="ga25abb4004fac0bcc0b937d93657c8cba"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxSafeYield </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classwx_window.html">wxWindow</a> * </td>
<td class="paramname"><em>win</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>onlyIfNeeded</em> = <code>false</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Calls <a class="el" href="classwx_app.html#a81cc0e2724a7adbc0cc8b0aeeb5a072f" title="This function is similar to wxYield(), except that it disables the user input to all program windows ...">wxApp::SafeYield</a>. </p>
<p>Include file: </p>
<pre class="fragment">#include <wx/app.h> </pre>
</div>
</div>
<a class="anchor" id="ga6aa1674945da924183f65de703aeafa3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxUninitialize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function is for use in console (wxBase) programs only. </p>
<p>Clean up; the library can't be used any more after the last call to <a class="el" href="group__group__funcmacro__appinitterm.html#ga6aa1674945da924183f65de703aeafa3" title="This function is for use in console (wxBase) programs only.">wxUninitialize()</a>.</p>
<p>It must be called once for each previous successful call to <a class="el" href="group__group__funcmacro__appinitterm.html#gaa7b284f57a94442126d1e45faca5b4ad" title="This function is used in wxBase only and only if you don't create wxApp object at all...">wxInitialize()</a>.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/app.h> </pre><p>See <a class="el" href="group__group__funcmacro__appinitterm.html#gaa7b284f57a94442126d1e45faca5b4ad" title="This function is used in wxBase only and only if you don't create wxApp object at all...">wxInitialize()</a> for more info.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/init.h> </pre>
</div>
</div>
<a class="anchor" id="ga97206743f70b5382f9e2615217604d15"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxWakeUpIdle </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function wakes up the (internal and platform dependent) idle system, i.e. </p>
<p>it will force the system to send an idle event even if the system currently <em>is</em> idle and thus would not send any idle event until after some other event would get sent. This is also useful for sending events between two threads and is used by the corresponding functions <a class="el" href="group__group__funcmacro__events.html#ga0cf60a1ad3a5f1e659f7ae591570f58d" title="In a GUI application, this function posts event to the specified dest object using wxEvtHandler::AddP...">wxPostEvent()</a> and <a class="el" href="classwx_evt_handler.html#a0737c6d2cbcd5ded4b1ecdd53ed0def3" title="Post an event to be processed later.">wxEvtHandler::AddPendingEvent()</a>.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/app.h> </pre>
</div>
</div>
<a class="anchor" id="gac386c89a04e364afc07edce6d848c27a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxYield </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Calls <a class="el" href="classwx_app_console.html#a302adeb701f247bf8cac1570efc25020">wxAppConsole::Yield</a>. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>This function is kept only for backwards compatibility. Please use the <a class="el" href="classwx_app_console.html#a302adeb701f247bf8cac1570efc25020">wxAppConsole::Yield</a> method instead in any new code.</dd></dl>
<p>Include file: </p>
<pre class="fragment">#include <wx/app.h> </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>
|