示例#1
0
文件: main.cpp 项目: alod83/IS-MOOS
int main(int argc ,char * argv[])
{
    //set up some default application parameters

    //whats the name of the configuration file that the application
    //should look in if it needs to read parameters?
    const char * sMissionFile = "App1.moos";

    //under what name shoud the application register with the MOOSDB?
    const char * sMOOSName = "MyMOOSApp";

    switch(argc)
    {
    case 3:
        //command line says don't register with default name
        sMOOSName = argv[2];
    case 2:
        //command line says don't use default "mission.moos" config file
        sMissionFile = argv[1];
    }

    //make an application
    CSimpleApp TheApp;

    //run forever pasing registration name and mission file parameters
    TheApp.Run(sMOOSName,sMissionFile);

    //probably will never get here..
    return 0;
}
示例#2
0
文件: main.cpp 项目: quinsmpang/Tools
int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
    // Start Win32++
    CSimpleApp theApp;

	// Run the application
    return theApp.Run();
}
示例#3
0
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, int)
{
    TCHAR szBuf[MAX_STRING_SIZE];
    ::LoadString(hInstance, IDW_MAIN, szBuf, MAX_STRING_SIZE -1);
    HWND hWnd = FindWindow(szBuf, NULL);

    // If application is already running, restore it and quit
    if (hWnd)
    {
        SetForegroundWindow ((HWND)(((DWORD)hWnd) | 0x01));
        TRACE(_T("Application Already running"));
        return -1;
    }

    //Start the framework
    CSimpleApp MyApp;

    //Process the window messages
    return MyApp.Run();
}