int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { MSG msg; HWND hWnd; WNDCLASS wc; // Register the main application window class. //............................................ wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon( hInstance, lpszAppName ); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wc.lpszMenuName = lpszAppName; wc.lpszClassName = lpszAppName; if ( IS_WIN95 ) { if ( !RegisterWin95( &wc ) ) return( FALSE ); } else if ( !RegisterClass( &wc ) ) return( FALSE ); hInst = hInstance; // Create the main application window. //.................................... hWnd = CreateWindow( lpszAppName, lpszTitle, WS_OVERLAPPEDWINDOW | WS_VSCROLL, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL ); if ( !hWnd ) return( FALSE ); ShowWindow( hWnd, nCmdShow ); UpdateWindow( hWnd ); while( GetMessage( &msg, NULL, 0, 0) ) { TranslateMessage( &msg ); DispatchMessage( &msg ); } return( msg.wParam ); }
DVD::DVD ( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow ) { _hInstance = hInstance; _hPrevInstance = hPrevInstance; _lpCmdLine = lpCmdLine; _nCmdShow = nCmdShow; _wc.style = CS_SAVEBITS // CS_HREDRAW | CS_VREDRAW ; _wc.lpfnWndProc = (WNDPROC)WndProc; _wc.cbClsExtra = 0; _wc.cbWndExtra = 0; _wc.hInstance = hInstance; _wc.hIcon = LoadIcon( hInstance, _AppName ); _wc.hCursor = LoadCursor(NULL, IDC_ARROW); _wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); _wc.lpszMenuName = _AppName; _wc.lpszClassName = _AppName; if ( IS_WIN95 ) { if ( !RegisterWin95() ) e-xit(-1); } else if ( !RegisterClass(&_wc ) ) e-xit(-1); hInst = hInstance; _init_carac = false; }