Projects > cpp > Issues > Feature #395

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

[win32] make AppDelegate.cpp created by VS wizard portable without any modification

Feature #395 [Closed] 2011-03-14 20:39 . Updated almost 7 years ago

Currently, I create a new project by VS2008 wizard, the initInstance() method looks like

bool AppDelegate::initInstance()
    bool bRet = false;
        // Initialize OpenGLView instance, that release by CCDirector when application terminate.
        // The HelloWorld is designed as HVGA.
        CCEGLView * pMainWnd = new CCEGLView();
        CC_BREAK_IF(! pMainWnd
            || ! pMainWnd->Create(TEXT("NewProject"), 320, 480));

        bRet = true;
    } while (0);
    return bRet;

This file is in the “Classes” folder. If develop copy it to different platform, e.g. ios, they had to write codes to init ios in AppDelete::initInstance() method.

Don’t make me think, do it by the wizard.
You can add multi-platforms’ init code in this method. Another choice is to refactor CCXEGLView, so the code in AppDelete::initInstance can init different platforms.

In one word, make AppDeletegate.cpp portbale, without any modifications by our developer. 2011-03-16 05:47
  • Target version changed from cocos2d-0.99.5-x-0.8.3 to cocos2d-0.99.5-x-0.8.1
yangws 2011-03-16 21:24
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:0384515690b19102a6507a91931e5b69c945b3a8.

yangws 2011-03-17 19:26
  • Status changed from Resolved to Closed 2012-05-25 08:15
  • Project changed from cocos2d-x to cpp
  • Category deleted (4)
  • Target version deleted (cocos2d-0.99.5-x-0.8.1)

Atom PDF

Start date:2011-03-14
Due date:
% Done:


Target version:-