Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / wxWindows, MinGW and Console App

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. wxWindows, MinGW and Console App
#4469
Posted by: 2004-06-16 00:17:04
Hello!
 Can anyone show me how to create a simple console app (with int main(...)) that can create a simple wxframe?
I try with mingw... but completely unsuccesfull!!!
thanks in advance
  Filippo
Message2. Re: wxWindows, MinGW and Console App
#4477
Posted by: upCASE 2004-06-16 14:57:31
Hi!
Let me get this straight:
You want to create a console app with "int main()" as the standard entry point. That app should create a wxFrame that actually gets shown and maybe can handle some actions.
Although I'm not quite sure why you want to do that, I suppose you'd have to use IMPLEMENT_APP_NO_MAIN() and call wxEntry from you main() function. Maybe it works by only using IMPLEMENT_WXWIN_MAIN_CONSOLE, too. Check app.h starting at line 610 for some more macros.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: wxWindows, MinGW and Console App
#4521
Posted by: 2004-06-18 01:49:55
The reason why I would like to create and call a wxFrame within a int main is simple!
I have an old fortran 77 program, I compiled it in g77 but I must to rewrite all graphic functions. So I would like to create them in wxWindow!
Thnaks, I am going to try these macros!
     Filippo
Message4. Re: wxWindows, MinGW and Console App
#4522
Posted by: upCASE 2004-06-18 02:01:04
Hi!
Go ahead and try. As far as I know people used wxWidget classes in command line apps, so it should be possible. The only problem I see is the event loop...
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2022-12-2  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0