本文整理汇总了C++中SystemClass::Initialize方法的典型用法代码示例。如果您正苦于以下问题:C++ SystemClass::Initialize方法的具体用法?C++ SystemClass::Initialize怎么用?C++ SystemClass::Initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SystemClass
的用法示例。
在下文中一共展示了SystemClass::Initialize方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
SystemClass* System;
bool result;
// Create the system object.
System = new SystemClass;
if(!System)
{
return 0;
}
// Initialize and run the system object.
result = System->Initialize();
if(result)
{
System->Run();
}
// Shutdown and release the system object.
System->Shutdown();
delete System;
System = 0;
return 0;
}
示例2: WinMain
//应用程序入口main函数
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
SystemClass* System;
bool result;
// 创建一个system对象.
System = new SystemClass;
if (!System)
{
return 0;
}
// 初始化以及运行system对象.
result = System->Initialize();
if (result)
{
System->Run();
}
// 关闭以及释放system对象.
System->Shutdown();
delete System;
System = 0;
return 0;
}
示例3: WinMain
int CALLBACK WinMain( HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int /*nCmdShow*/)
{
SystemClass* system = nullptr;
bool result = true;
//Create the system object
system = new SystemClass();
if (!system)
{
return 0;
}
//Initialize and run the system object
result = system->Initialize();
if (result)
{
system->Run();
}
//Shutdown and release the system object.
system->Shutdown();
delete system;
system = 0;
return 0;
}
示例4: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
SystemClass* System;
bool result;
AllocConsole();
freopen("conin$","r",stdin);
freopen("conout$","w",stdout);
freopen("conout$","w",stderr);
printf("Debugging Window:\n");
// Create the system object.
System = new SystemClass;
if(!System)
{
return 0;
}
// Initialize and run the system object.
result = System->Initialize();
if(result)
{
System->Run();
}
// Shutdown and release the system object.
System->Shutdown();
delete System;
System = 0;
return 0;
}
示例5: WinMain
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,PSTR pScmdLine,int iCmdShow)
{
SystemClass* system = nullptr;
bool result;
system = new SystemClass;
if (!system)
result = false;
result = system->Initialize();
if (result)
{
system->Run();
}
system->Shutdown();
delete system;
system = nullptr;
}
示例6: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
surfCameraInstance.Init("Photo5.jpg");
while (true) {
surfCameraInstance.Frame();
}
SystemClass* System;
bool result;
//int counter = 0;
// Create the system object.
System = new SystemClass;
if(!System)
{
return 0;
}
// Initialize and run the system object.
result = System->Initialize();
if(result)
{
System->Run();
}
// Shutdown and release the system object.
System->Shutdown();
delete System;
System = 0;
return 0;
}
示例7: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
//FILELog::ReportingLevel() = logDEBUG3;
//FILE* log_fd = fopen( "mylogfile.txt", "w" );
//Output2FILE::Stream() = log_fd;
SystemClass* System; //pointer to a System object
bool result;
System = new SystemClass; //create new System object where the pointer is pointing
if(!System) //if system is null
{
return 0;
}
result = System->Initialize(); //run the initialize method in the object that System is pointing at
if(result) //if it returned true
{
System->Run(); //start the program loop by running Run in the object that system is pointing at
}
System->Shutdown(); //clean System object
delete System; //remove system object
System = 0; //set pointer to null
return 0; //exit da program
}
示例8: _tWinMain
int APIENTRY _tWinMain( _In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPTSTR lpCmdLine,
_In_ int nCmdShow )
{
// Create the system object.
SystemClass* pSystem = new SystemClass;
if ( !pSystem )
{
return 0;
}
// Initialize and run the system object.
bool bResult = pSystem->Initialize();
if ( bResult )
{
pSystem->Run();
}
// Shutdown and release the system object.
pSystem->Shutdown();
delete pSystem;
pSystem = 0;
return 0;
}
示例9: WinMain
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pScmdline, int iCmdshow ) {
SystemClass* system;
bool result;
system = new SystemClass;
if ( !system ) return 0;
result = system->Initialize( );
if ( result ) system->Run();
system->Shutdown( );
delete system;
system = 0;
return 0;
}
示例10: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
/*
HINSTANCE hInstance : handle of the applications current instance
HINSTANCE hPrevInstance : handle of the applications previous instance (should be NULL according to MSDN)
PSTR pScmdline : commandline arguments invoked with main (we won't use this)
int iCmdshow : An ID that specifies how the window should be shown
There is also a wWinMain(...) version with the same arguments that passes unicode characters for
the pScmdline argument rather than ANSI as WinMain does
*/
SystemClass* System; //system class encapsulates our overall app
bool result;
/*
Allocate a "side car" console so we can write some debug information out to it
*/
if(use_debug_console) AllocConsole();
writeToDebugConsole(L"Hello World\n");
// Create the system object.
System = new SystemClass;
if(!System)
{
return 0; //our system object did not construct properly
}
// Initialize our system object and run the application by asking
// the system object to run.
result = System->Initialize();
if(result)
{
System->Run();
}
// Shutdown and release the system object.
System->Shutdown(); //give system a chance to clean up
delete System; //release the system object's memory
System = 0; //set system pointer to 0 so it is no longer valid
return 0;
}
示例11: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdShow) {
SystemClass* systemClass;
bool result;
systemClass = new SystemClass;
if (!systemClass) {
return 0;
}
result = systemClass->Initialize();
if (result) {
systemClass->Run();
}
systemClass->Shutdown();
delete systemClass;
systemClass = 0;
return 0;
}
示例12: WinMain
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR pCmdLine, int iCmdShow)
{
SystemClass* system;
bool result;
system = new SystemClass;
if (!system)
{
return -1;
}
result = system->Initialize();
if (result)
{
system->Run();
}
system->Shutdown();
delete system;
system = NULL;
return 0;
}
示例13: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
SystemClass* System;
bool result;
System = new SystemClass;
if(!System)
{
return 1;
}
if(System->Initialize())
{
System->Run();
}
System->Shutdown();
delete System;
System = 0;
return 0;
}
示例14: WinMain
int WINAPI WinMain(HINSTANCE _Instance, HINSTANCE _PrevInstance, PSTR _CommandLine, int _CommandShow)
{
bool Result;
SystemClass *System;
System = new SystemClass;
if(!System)
{
return 0;
}
Result = System->Initialize();
if(Result)
{
System->Run();
}
System->Shutdown();
delete System;
System = 0;
return 0;
}