#10 It adds support of only one instance of an application

closed-accepted
nobody
None
5
2007-06-15
2006-03-28
No

Small and usefull patch (especially for Pocket PC where
almost every application is a single-instance).

It just adds a necessary API and hello application
could be:

int SmartWinMain( Application & app )
{
HelloWinClass * testHello = new HelloWinClass;
if( !Application::IsAppAlreadyRunning() )
{
testHello->initAndCreate();
return app.run();
}
else
{
testHello->ActivatePreviousInstance();
return 0;
}
}

Quite easy to understand and it is flexible too.
Please feel free to include to 2.0 version.

Discussion

  • Thomas Hansen

    Thomas Hansen - 2006-03-29

    Logged In: YES
    user_id=868615

    This is really great Dmitry! :)
    In fact a couple of weeks ago my collegue asked me if we
    could include this type of functionality in our Pocket PC
    client since sometimes you run the risc of hiding the main
    window without any other ways to "showing" it then going to
    running programs and choose activate.
    This made people often without realizing it fire up a second
    instance of our application...

    This will go directly into not only the CVS but also as a
    feature in my Pocet PC application in my "commercial" life! :)

    .t

     
  • Thomas Hansen

    Thomas Hansen - 2006-03-29

    Logged In: YES
    user_id=868615

    Howdy, I think you forgot to sen in the diff for the
    Application.cpp...??

    .t

     
  • Dmitry Yakimov

    Dmitry Yakimov - 2006-03-29

    Logged In: YES
    user_id=134416

    Oh, I forgot to include all the patch, so here is a new one.
    Thanks, it is great to hear that this patch will be in smartwin.

     
  • andrew7

    andrew7 - 2007-06-15
    • status: open --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks