How to create App without event loop? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Gnawer
Experienced Solver
Experienced Solver
Posts: 65
Joined: Thu Jun 29, 2006 11:10 am
Location: Ahlen, Germany

How to create App without event loop?

Post by Gnawer »

Hi,
I want to create an app like this:

Code: Select all

int main(int argc, char** argv) {
  // ...
  wxLogError("Hello, I'm an error");
  // ...
  return 0;
}
The speciality is using wx elements without wxApp, event loops, etc. The compiler detects unresolved external "_WinMain@16" in function "___tmainCRTStartup".
Can I make it somehow?
Best regards
Gnawer
extreme001
I live to help wx-kind
I live to help wx-kind
Posts: 192
Joined: Fri Dec 22, 2006 9:17 am
Location: Germany
Contact:

Post by extreme001 »

Try this:

Code: Select all

/*!
 * Application instance implementation
 */


IMPLEMENT_APP( YourApp )


IMPLEMENT_CLASS( YourApp, wxApp )




YourApp::YourApp
{
...and then your custom code. Or take a look at the samples on how to create a generic app-instance.
Gnawer
Experienced Solver
Experienced Solver
Posts: 65
Joined: Thu Jun 29, 2006 11:10 am
Location: Ahlen, Germany

Post by Gnawer »

Yes, that´s it. Thanks a lot!
Best regards
Gnawer
Post Reply