码迷,mamicode.com
首页 > 移动开发 > 详细

A minimal wxWidgets console application

时间:2015-08-15 13:14:18      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:

learning by doing, recently i‘m learning English, and maybe from now on, i‘ll post article in English (if possible).

in the very beginning, it may diffcult for me, but it doesn‘t matter, i hope it will help me a lot. :-)

and here is the minimal wxWidgets console application code: 

 1 /****************************************
 2  * Name:      minimal_console.cpp
 3  * Author:    junkman
 4  * Created:   2015-08-14 PM
 5  ****************************************/
 6 #include <wx/wx.h>
 7 int main()
 8 {
 9     // IN A CONSOLE APPLICATION, YOU SHOULD INIT. IT MANUAL
10     wxInitializer wx;
11     if( !wx.IsOk() ) return -1;
12     
13     wxString msg;
14     msg.Printf(wxT("Hello and welcome to %s"), 
15                 wxVERSION_STRING);
16     wxPuts(msg);
17     // IN WINDOWS, YOU MAY USE: wxShell(wxT("pause"));
18     getchar();
19     return 0;
20 }

i‘m using wxWidgets 3.0.2, which compile and run would see:

Hello and welcome to wxWidgets 3.0.2

it nothing but a tony application. but take me into wxWidgets.

in the catalog of "wxWidgets", i‘m using wxWidgets 3.0.2 and compile it in MSVC++ 2010E, platform in Windows 7.

A minimal wxWidgets console application

标签:

原文地址:http://www.cnblogs.com/untitled/p/4732088.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!