• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ InitApp函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中InitApp函数的典型用法代码示例。如果您正苦于以下问题:C++ InitApp函数的具体用法?C++ InitApp怎么用?C++ InitApp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了InitApp函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: wWinMain

//--------------------------------------------------------------------------------------
// Entry point to the program. Initializes everything and goes into a message processing 
// loop. Idle time is used to render the scene.
//--------------------------------------------------------------------------------------
int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPWSTR /*lpCmdLine*/, int /*nCmdShow*/)
{
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif

    // Disable gamma correction on this sample
    DXUTSetIsInGammaCorrectMode(false);

    DXUTSetCallbackDeviceChanging(ModifyDeviceSettings);
    DXUTSetCallbackMsgProc(MsgProc);
    DXUTSetCallbackFrameMove(OnFrameMove);

    DXUTSetCallbackD3D11DeviceAcceptable(IsD3D11DeviceAcceptable);
    DXUTSetCallbackD3D11DeviceCreated(OnD3D11CreateDevice);
    DXUTSetCallbackD3D11SwapChainResized(OnD3D11ResizedSwapChain);
    DXUTSetCallbackD3D11FrameRender(OnD3D11FrameRender);
    DXUTSetCallbackD3D11SwapChainReleasing(OnD3D11ReleasingSwapChain);
    DXUTSetCallbackD3D11DeviceDestroyed(OnD3D11DestroyDevice);

    InitApp();

    // Force create a ref device so that feature level D3D_FEATURE_LEVEL_11_0 is guaranteed
    DXUTInit(true, true, NULL); // Parse the command line, show msgboxes on error
    DXUTSetCursorSettings(true, true); // Show the cursor and clip it when in full screen
    DXUTCreateWindow(L"OIT11");
    DXUTCreateDevice(D3D_FEATURE_LEVEL_11_0, true, g_nFrameWidth, g_nFrameHeight);
    DXUTMainLoop(); // Enter into the DXUT render loop

    return DXUTGetExitCode();
}
开发者ID:marselas,项目名称:Zombie-Direct3D-Samples,代码行数:36,代码来源:main.cpp


示例2: WinMain

int WINAPI WinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst,
                   LPSTR lpsCmdLine, int nCmdShow)
{
    MSG msg;
    BOOL bRet;
    HACCEL hAccel;                      // アクセラレータハンドル

    if (!InitApp(hCurInst))
        return FALSE;
    if (!InitInstance(hCurInst, nCmdShow))
        return FALSE;

    // アクセラレータテーブルを読み込む
    hAccel = LoadAccelerators(hCurInst, TEXT("MYACCEL"));

    while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0) {
        if (bRet == -1) {
            break;
        } else {
            if (!TranslateAccelerator(hParent, hAccel, &msg)) {
                TranslateMessage(&msg);
                DispatchMessage(&msg);
            }
        }
    }
    return (int)msg.wParam;
}
开发者ID:tomorrow56,项目名称:VS2010,代码行数:27,代码来源:menu02.cpp


示例3: main

int16_t main(void)
{
    // Initialize IO ports and peripherals.
    ConfigureOscillator();
    InitApp();
    InitAdc();
    AtpInit();
    odo_init(); // TODO
    motion_init(SendDone);

    SendBoardId();
    __delay_ms(3000);
    SendBoardId();


    while(1) {
        //SendBoardId();

        if (odoBroadcast) {
            OnGetPos();
        }

        __delay_ms(odoDelay);

    }
}
开发者ID:7Robot,项目名称:ATP,代码行数:26,代码来源:main.c


示例4: main

void main(void)
{
    /* Configure the oscillator for the device */
    ConfigureOscillator();

    /* Initialize I/O and Peripherals for application */
    InitApp();
    
    /* everything is an output */
    TRISIO = 0;
    
    /* turn off all pins */
    GPIO = 0x00000000;

    while(1)
    {
        __delay_ms(100);
    
        /* turn on GPIO pin 2 */
        GPIO = 0b00000100;
        
        __delay_ms(100);
    
        /* turn off GPIO pin 2 */
        GPIO = 0b00000000;
    }

}
开发者ID:camswords,项目名称:pic-blink-led,代码行数:28,代码来源:main.c


示例5: main

void main(void)
{
    /* Configure the oscillator for the device */
    ConfigureOscillator();

    /* Initialize I/O and Peripherals for application */
    InitApp();
    InitSPI();
    InitInterrupts();

    LCD_Init();

    RF_ConfigReceiver();
    LCD_WriteFirstLine("NRF Initialized");
//    LCD_Write();

    
    while(1)
    {
        if(RF_ReceiveFlag == 1){
            RF_ResetReceiver();
            if(RF_ReceiveBuffer[0] == 0x01){
                ToggleLED_B7();
                LCD_WriteFirstLine("Receive Action:");
                LCD_WriteSecondLine("L-Button Pressed");
            }

            else if(RF_ReceiveBuffer[0] == 0x02){
                ToggleLED_B7();
                LCD_WriteFirstLine("Receive Action:");
                LCD_WriteSecondLine("R-Button Pressed");
            }
        }
    }
}
开发者ID:RonMar89,项目名称:pic18_LF25K50_LCD.X,代码行数:35,代码来源:main.c


示例6: WinMain

//--------------------------------------------------------------------------------------
// Entry point to the program. Initializes everything and goes into a message processing 
// loop. Idle time is used to render the scene.
//--------------------------------------------------------------------------------------
INT WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
{
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

    // DXUT will create and use the best device (either D3D9 or D3D10) 
    // that is available on the system depending on which D3D callbacks are set below

    // Set DXUT callbacks
    DXUTSetCallbackDeviceChanging( ModifyDeviceSettings );
    DXUTSetCallbackMsgProc( MsgProc );
    DXUTSetCallbackKeyboard( KeyboardProc );
    DXUTSetCallbackFrameMove( OnFrameMove );
    DXUTSetCallbackD3D10DeviceAcceptable( IsD3D10DeviceAcceptable );
    DXUTSetCallbackD3D10DeviceCreated( OnD3D10CreateDevice );
    DXUTSetCallbackD3D10SwapChainResized( OnD3D10SwapChainResized );
    DXUTSetCallbackD3D10SwapChainReleasing( OnD3D10ReleasingSwapChain );
    DXUTSetCallbackD3D10DeviceDestroyed( OnD3D10DestroyDevice );
    DXUTSetCallbackD3D10FrameRender( OnD3D10FrameRender );

    InitApp();
    DXUTInit( true, true, NULL ); // Parse the command line, show msgboxes on error, no extra command line params
    DXUTSetCursorSettings( true, true ); // Show the cursor and clip it when in full screen
    DXUTCreateWindow( L"D3D10 Shader Model 4.0 Workshop: Exercise03" );
    DXUTCreateDevice( true, 800, 600 );
    DXUTMainLoop(); // Enter into the DXUT render loop

    return DXUTGetExitCode();
}
开发者ID:KNeal,项目名称:Oculus,代码行数:35,代码来源:Exercise03.cpp


示例7: wWinMain

//--------------------------------------------------------------------------------------
// Entry point to the program. Initializes everything and goes into a message processing 
// loop. Idle time is used to render the scene.
//--------------------------------------------------------------------------------------
int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow )
{
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

    // DXUT will create and use the best device (either D3D9 or D3D11) 
    // that is available on the system depending on which D3D callbacks are set below

    // Set DXUT callbacks
    DXUTSetCallbackDeviceChanging( ModifyDeviceSettings );
    DXUTSetCallbackMsgProc( MsgProc );
    DXUTSetCallbackKeyboard( OnKeyboard );
    DXUTSetCallbackFrameMove( OnFrameMove );

    DXUTSetCallbackD3D11DeviceAcceptable( IsD3D11DeviceAcceptable );
    DXUTSetCallbackD3D11DeviceCreated( OnD3D11CreateDevice );
    DXUTSetCallbackD3D11SwapChainResized( OnD3D11ResizedSwapChain );
    DXUTSetCallbackD3D11FrameRender( OnD3D11FrameRender );
    DXUTSetCallbackD3D11SwapChainReleasing( OnD3D11ReleasingSwapChain );
    DXUTSetCallbackD3D11DeviceDestroyed( OnD3D11DestroyDevice );

    InitApp();
    DXUTInit( true, true, NULL ); // Parse the command line, show msgboxes on error, no extra command line params
    DXUTSetCursorSettings( true, true ); // Show the cursor and clip it when in full screen
    DXUTCreateWindow( L"BasicHLSL11" );
    DXUTCreateDevice (D3D_FEATURE_LEVEL_11_0, true, 800, 600 );
    //DXUTCreateDevice(true, 640, 480);
    DXUTMainLoop(); // Enter into the DXUT render loop

    return DXUTGetExitCode();
}
开发者ID:AlexKLM,项目名称:DX11-Shader-Language-Coursework,代码行数:37,代码来源:BasicHLSL11.cpp


示例8: main

int16_t main(void)
{

    /* Configure the oscillator for the device */
    ConfigureOscillator();

    /* Initialize IO ports and peripherals */
    InitApp();

    TRISBbits.TRISB1 = 0;
    TRISBbits.TRISB2 = 0;
    TRISAbits.TRISA2 = 0;

    LATBbits.LATB1=0;
    LATBbits.LATB2=0;
    LATAbits.LATA2=0;

   IPC0bits.T1IP = 5;	 //set interrupt priority

    PR1 = 32767;
    T1CONbits.TON = 1;
    T1CONbits.TCS = 1;
    T1CONbits.TCKPS = 0;

    IFS0bits.T1IF = 0;	 //reset interrupt flag
    IEC0bits.T1IE = 1;	 //turn on the timer1 interrupt
    while(1);
}
开发者ID:andyHa,项目名称:electronics,代码行数:28,代码来源:main.c


示例9: main

void main(void)
{
    /* Configure the oscillator for the device */
    ConfigureOscillator();

    /* Initialize I/O and Peripherals for application */
    InitApp();

    TRISA = 0x00; // If you use RA2 as an input without first setting it as an output, some charge lingers and the input reads high even if the pin is tied to ground. I have a theory as to why this happens but all I really know for sure is that setting it as output first seems to prevent the weird thing from happening.

    for (int x = 0; x < 5; x++) senderAddress [x] = 0x02;
    for (int x = 0; x < 5; x++) receiverAddress [x] = 0x01;

    
    uint8_t receivedMessage [9];

    //runTests();

    //loopReceivingTestMessage();
    loopSendingTestMessage();


    nerf_init (&TRISA, &LATA, &PORTA, &TRISB, &LATB, &PORTB, receiverAddress);

    while (true){
        nerf_receiveAndRespondToCommand();
    }
}
开发者ID:easlern,项目名称:nerf,代码行数:28,代码来源:main.c


示例10: main

void main(void) {
    int count;
    unsigned int adcValue = 0;
    unsigned int adcValueOld = 0;
    char buffer[16];

    ConfigureOscillator();
    InitApp();

    lcd_init();
    lcd_enable();
    lcd_cursor_off();
    lcd_test();
    lcd_pos(2, 1);
    while (1) {
        ConvertADC();
        while (BusyADC());
        adcValue = ReadADC();
        if (adcValue != adcValueOld) {
            lcd_clear();
            lcd_pos(1, 1);
            memset(&buffer[0], 0, sizeof(buffer));
            sprintf(&buffer[0], "Valor: %.4u %.3u%%", adcValue, (int)(((float)adcValue / 1024) * 100));
            lcd_write_buffer(buffer, strlen(buffer));
            adcValueOld = adcValue;
        }
        __delay_ms(20);
    }
}
开发者ID:alexandrebl,项目名称:MicrochipPIC,代码行数:29,代码来源:main.c


示例11: acrxEntryPoint

AcRx::AppRetCode 
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
	switch(msg)
	{
        case AcRx::kInitAppMsg:
			acrxUnlockApplication(pkt);
			acrxRegisterAppMDIAware(pkt);
			InitApp();
            break;
        case AcRx::kUnloadAppMsg:
			acedRegCmds->removeGroup(_T("DYNBLKAPP"));
			if (pPts)
			{
				ACRX_PROTOCOL_REACTOR_LIST_AT(AcDbBlockTableRecord::desc(), 
					AsdkInsertionPoints::desc())->removeReactor(pPts);
				delete pPts;
                pPts = NULL;
			}
            break;
        default:
            break;
    }
	return AcRx::kRetOK;
}
开发者ID:FengLuanShuangWu,项目名称:AutoCADPlugin-HeatSource,代码行数:25,代码来源:ProtocolReactors.cpp


示例12: wWinMain

//--------------------------------------------------------------------------------------
// Entry point to the program. Initializes everything and goes into a message processing 
// loop. Idle time is used to render the scene.
//--------------------------------------------------------------------------------------
int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, 
                     LPWSTR lpCmdLine, int nCmdShow )
{
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

    // Disable gamma correction on this sample
    DXUTSetIsInGammaCorrectMode( false );

    DXUTSetCallbackDeviceChanging( ModifyDeviceSettings );
    DXUTSetCallbackMsgProc( MsgProc );
    DXUTSetCallbackFrameMove( OnFrameMove );
    DXUTSetCallbackMouse( MouseProc );
    DXUTSetCallbackKeyboard( OnKeyboard );

    DXUTSetCallbackD3D11DeviceAcceptable( IsD3D11DeviceAcceptable );
    DXUTSetCallbackD3D11DeviceCreated( OnD3D11CreateDevice );
    DXUTSetCallbackD3D11SwapChainResized( OnD3D11ResizedSwapChain );
    DXUTSetCallbackD3D11FrameRender( OnD3D11FrameRender );
    DXUTSetCallbackD3D11SwapChainReleasing( OnD3D11ReleasingSwapChain );
    DXUTSetCallbackD3D11DeviceDestroyed( OnD3D11DestroyDevice );

    InitApp();
    
    DXUTInit( true, true );

    DXUTSetCursorSettings( true, true );// Show the cursor and clip when in full screen
    DXUTCreateWindow( L"Contact Hardening Shadows - Direct3D 11" );
    DXUTCreateDevice( D3D_FEATURE_LEVEL_11_0, true, 800, 600 );
    DXUTMainLoop();                         // Enter into the DXUT render loop

    return DXUTGetExitCode();
}
开发者ID:KNeal,项目名称:Oculus,代码行数:39,代码来源:ContactHardeningShadows11.cpp


示例13: wWinMain

// main 함수 임
INT WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int )
{
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

    DXUTSetCallbackD3D9DeviceCreated( OnCreateDevice );
    DXUTSetCallbackD3D9DeviceReset( OnResetDevice );
    DXUTSetCallbackD3D9FrameRender( OnFrameRender );
	
	//focus를 상실했을 때. 즉 창모드/전체화면 모드 변경시 처리 과정
    DXUTSetCallbackD3D9DeviceLost( OnLostDevice );
    DXUTSetCallbackD3D9DeviceDestroyed( OnDestroyDevice );
    DXUTSetCallbackMsgProc( MsgProc );

	//update 역할, 렌더 직전에 변경사항 적용하는 부분
	DXUTSetCallbackFrameMove( OnFrameMove );

	//조명 초기화
    InitApp();

	//키보드 단축키를 받아 처리하도록 하는 플래그 설정 함수
	DXUTSetHotkeyHandling( true, true, true );

    DXUTCreateWindow( L"BasicHLSL" );
    DXUTCreateDevice( true, 640, 480 );

	// main 무한 루프
	// 무한 루프 중 세팅되는 값들을 적용해 화면에 표시함
    DXUTMainLoop();


    return DXUTGetExitCode();
}
开发者ID:trizdreaming,项目名称:windowsGameProg_DirectXTutorial,代码行数:36,代码来源:BasicHLSL.cpp


示例14: WinMain

// ------------------------------------------------------------------------------------------
// WinMain
// ------------------------------------------------------------------------------------------
int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{
	MSG msg;

	if(!InitApp(hInst, nCmdShow))
        CDXError( NULL , "could not initialize CDX application" );

	while(1)
	{
		if(PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
		{
			if(!GetMessage(&msg, NULL, 0, 0 )) return msg.wParam;
			TranslateMessage(&msg); 
			DispatchMessage(&msg);
		}
		else if(bActive)
		{
            // clear screen
			Screen->GetBack()->Fill(0);

            // draw menu
			CurrentMenu->Draw(300, 150);

            // display back buffer
			Screen->Flip();
		}
		else WaitMessage();
	}
}
开发者ID:hyuntaeng,项目名称:CDX,代码行数:32,代码来源:ex12.cpp


示例15: wWinMain

//--------------------------------------------------------------------------------------
// Entry point to the program. Initializes everything and goes into a message processing 
// loop. Idle time is used to render the scene.
//--------------------------------------------------------------------------------------
INT WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int )
{
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

    // DXUT will create and use the best device (either D3D9 or D3D10) 
    // that is available on the system depending on which D3D callbacks are set below

    // Set DXUT callbacks
    DXUTSetCallbackD3D9DeviceAcceptable( IsDeviceAcceptable );
    DXUTSetCallbackD3D9DeviceCreated( OnCreateDevice );
    DXUTSetCallbackD3D9DeviceReset( OnResetDevice );
    DXUTSetCallbackD3D9FrameRender( OnFrameRender );
    DXUTSetCallbackD3D9DeviceLost( OnLostDevice );
    DXUTSetCallbackD3D9DeviceDestroyed( OnDestroyDevice );
    DXUTSetCallbackMsgProc( MsgProc );
    DXUTSetCallbackKeyboard( KeyboardProc );
    DXUTSetCallbackFrameMove( OnFrameMove );
    DXUTSetCallbackDeviceChanging( ModifyDeviceSettings );

    DXUTSetCursorSettings( true, true );
    InitApp();
    DXUTInit( true, true ); // Parse the command line and show msgboxes
    DXUTSetHotkeyHandling( true, true, true );
    DXUTCreateWindow( L"CompiledEffect" );
    DXUTCreateDevice( true, 640, 480 );
    DXUTMainLoop();

    return DXUTGetExitCode();
}
开发者ID:KNeal,项目名称:Oculus,代码行数:36,代码来源:CompiledEffect.cpp


示例16: wWinMain

INT WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
{
    DXUTSetCallbackD3D9DeviceAcceptable(IsDeviceAcceptable);
    DXUTSetCallbackD3D9DeviceCreated(OnCreateDevice);
    DXUTSetCallbackD3D9FrameRender(OnFrameRender);
    DXUTSetCallbackD3D9DeviceReset(OnResetDevice);
    DXUTSetCallbackD3D9DeviceLost(OnLostDevice);
    DXUTSetCallbackD3D9DeviceDestroyed(OnDestroyDevice);
    DXUTSetCallbackMsgProc(MsgProc);
    DXUTSetCallbackKeyboard(KeyboardProc);
    DXUTSetCallbackMouse(MouseProc, true);
    DXUTSetCallbackFrameMove(OnFrameMove);
    DXUTSetCallbackDeviceChanging(ModifyDeviceSettings);

    DXUTSetCursorSettings(true, true);

    InitApp();

    DXUTInit();
    DXUTSetHotkeyHandling();
    DXUTCreateWindow(L"NsRenju by Ivan Goremykin");
    DXUTCreateDevice(true, 1024, 768);

    DXUTMainLoop();

    return DXUTGetExitCode();
}
开发者ID:Bastila,项目名称:c-plus-plus-examples,代码行数:27,代码来源:NsRenju.cpp


示例17: main

int main( int argc, char *argv[] )
{
	int tmpcount;
	g_argc = argc;
	g_argv = argv;
	
	g_argc = 5;
	g_argv[0] = 0;
	g_argv[1] = "121.199.44.76";
	g_argv[2] = "22221";
	//g_argv[1] = "127.0.0.1";
	//g_argv[2] = "11521";
	g_argv[3] = "200";
	g_argv[4] = "1000";

	CheckSystemPath();
	
	InitApp();

	fps_count = 0;
	while(1)
	{
		//		if( fps_count < 10 )
		//			Sleep(1000);
		WaitForSingleObject( g_timer_event, INFINITE );
		ResetEvent( g_timer_event);
		System_Logic();
		fps_count++;
		clrscr();
		printf("read list:%d write_list:%d -- %d                                      \r",max_read_list_count, max_write_list_count, g_enter_num );
		tmpcount = 0;
		for( int tmpi = 0; tmpi < g_nClientNum; tmpi++ )
		{
			if( tmpi % 25 == 0 )
				printf( "\n" );
			if( g_Player[tmpi].stat < 0 )
				printf( "#%d", g_Player[tmpi].wait_stat );
			else
				printf( "%2d", g_Player[tmpi].stat );
			if( g_Player[tmpi].isconnected )
				tmpcount++;
		}
		printf( "\nConnected:%d\tSendcount:%d(%d)", tmpcount,g_send_count,g_send_num );

		printf( "\n\n" );
		printf( " # 等待某状态\t" );
		printf( " 0 无状态\t" );
		printf( " 1 战斗等待中\n" );
		printf( " 2 开始(未登录)\t" );
		printf( " 3 已经登录\t" );
		printf( " 4 已经列角色\n" );
		printf( " 5 游戏普通状态\t" );
		printf( " 6 游戏进入战斗\t" );
		printf( " 7 等待战斗指令\n" );
		printf( " 8 已进入游戏\t" );
		printf( " 9 创建角色\n" );
		printf( " 10 登出\n" );
	}
	return 0;
}
开发者ID:Gamesjiazhi,项目名称:rwproject,代码行数:60,代码来源:Main.cpp


示例18: _tWinMain

int APIENTRY _tWinMain(HINSTANCE hCurInst,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
 	// TODO: ここにコードを挿入してください。
	MSG msg;
	BOOL bRet;

	hInst = hCurInst;	//インスタンスハンドルをグローバル変数にコピー

	// アプリケーションの初期化を実行します:
	if (!InitApp (hCurInst))
	{
		return FALSE;
	}
	if (!InitInstance (hCurInst, nCmdShow))
	{
		return FALSE;
	}

	// メイン メッセージ ループ:
	while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0)
	{
		if (bRet == -1) {
			break;
		} else {
			TranslateMessage(&msg);
			DispatchMessage(&msg);
		}
	}

	return (int) msg.wParam;
}
开发者ID:tomorrow56,项目名称:VS2010,代码行数:34,代码来源:html02.cpp


示例19: WinMain

/*****************************************************************************
*
* WinMain
*
* Called by C startup code.
*
* HANDLE hInst              - Instance handle of this instance
* HANDLE hPrevInst          - Instance handle of previous instance or
*                             NULL if we are the first instance
* LPSTR lpstrCmdLine        - Any command line arguments
* int nCmdShow              - Code for ShowWindow which tells us what state
*                             to initially show the main application window.
*
* Initialize application if first instance.
* Initialize instance.
* Stay in main message processing loop until exit.
*
*****************************************************************************/
int PASCAL WinMain(
    HINSTANCE                  hInst,
    HINSTANCE                  hPrevInst,
    LPSTR                   lpstrCmdLine,
    int                     nCmdShow)
{
    MSG                     msg;

    if (hPrevInst == NULL)
        if (!InitApp(hInst))
            return 0;

    if (!InitInstance(hInst, nCmdShow))
    {
        TerminateInstance();
        return 0;
    }

    while (GetMessage(&msg, NULL, 0, 0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    TerminateInstance();

    return (int) msg.wParam;
}
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:46,代码来源:MidiPlyr.c


示例20: WinMain

int WinMain(HINSTANCE hInstance,
            HINSTANCE hPrevInstance,
            LPWSTR lpCmdLine,
            int nCmdShow)
{
    MSG msg;
    HWND hwndMain=0;
    int rc;

    rc = InitApp(hInstance);
    if (rc) return rc;

    hwndMain=InitInstance(hInstance,lpCmdLine, nCmdShow);
    if (hwndMain == 0) return 0x10;

    flowm_init();  /* Initialize the TTS system */

    while (GetMessage(&msg,NULL,0,0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    flowm_terminate(); /* Close the TTS systems */

    return msg.wParam;
}
开发者ID:006,项目名称:ios_lab,代码行数:27,代码来源:flowm_main.c



注:本文中的InitApp函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ InitApplication函数代码示例发布时间:2022-05-30
下一篇:
C++ Init函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap