From ffcadf7db04e6880b792f6fdbce0cb711ff2e48d Mon Sep 17 00:00:00 2001 From: Liu Chao Date: Sun, 24 Mar 2013 21:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0helloworld=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/helloworld.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/test/helloworld.c b/test/helloworld.c index a3a23768..c3e89e30 100755 --- a/test/helloworld.c +++ b/test/helloworld.c @@ -14,14 +14,8 @@ static void destroy( LCUI_Widget *widget, LCUI_WidgetEvent *unused ) } #ifdef __cplusplus -#ifdef LCUI_BUILD_IN_WIN32 -int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) +int LCUIMainFunc( LCUI_ARGLIST ) { - Win32_LCUI_Init( hInstance ); -#else -int main(void) -{ -#endif LCUIApp app; LCUIWindow wind; LCUILabel text; @@ -37,24 +31,18 @@ int main(void) wind.addToClientArea( text ); text.show(); wind.show(); - app.main(); + return app.main(); } #else -#ifdef LCUI_BUILD_IN_WIN32 -int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) -#else -int main(int argc, char*argv[]) -#endif + +int LCUIMainFunc( LCUI_ARGLIST ) { LCUI_Widget *window, *label; LCUI_TextStyle style; LCUI_Graph pic; -#ifdef LCUI_BUILD_IN_WIN32 - Win32_LCUI_Init( hInstance ); -#endif - LCUI_Init(); + LCUI_Init( LCUI_DEFAULT_CONFIG ); /* 初始化结构体 */ Graph_Init( &pic );