PMApp: Difference between revisions
Appearance
Created page with "==Description== The PMApp class is the main class for a PM++ application and contains the command line parameters, a PMAnchorBlock and a PMMessageQueue, and a few fun..." |
|||
Line 7: | Line 7: | ||
==Example== | ==Example== | ||
With these classes the main() function of a PM++ application | With these classes the main() function of a PM++ application can be as simple as: | ||
can be as simple as: | |||
<PRE> | |||
PMApp *App; | PMApp *App; | ||
Line 33: | Line 33: | ||
return (0); | return (0); | ||
} | } | ||
</PRE> |
Revision as of 02:58, 3 December 2015
Description
The PMApp class is the main class for a PM++ application and contains the command line parameters, a PMAnchorBlock and a PMMessageQueue, and a few functions to process the window messages of the application's main thread.
Example
With these classes the main() function of a PM++ application can be as simple as:
PMApp *App; int main (int argc,char* argv[]) { PMAnchorBlock ab; PMMessageQueue mq; ab.init(); mq.create(ab); App=new PMApp(ab,mq,argc,argv); PMWin * w=new PMWin(ab); w->createWin(); App->run(); w->destroyWin(); mq.destroy(); ab.uninit(); return (0); }