Logo ROOT  
Reference Guide
TWin32SplashThread.cxx
Go to the documentation of this file.
1
2/*************************************************************************
3 * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
4 * All rights reserved. *
5 * *
6 * For the licensing terms see $ROOTSYS/LICENSE. *
7 * For the list of contributors see $ROOTSYS/README/CREDITS. *
8 *************************************************************************/
9
10#include "Windows4Root.h"
11#include "TWin32SplashThread.h"
12
14
15extern void CreateSplash(DWORD time, bool extended);
16extern void DestroySplashScreen();
17
18////////////////////////////////////////////////////////////////////////////////
19/// thread for handling Splash Screen
20
21static DWORD WINAPI HandleSplashThread(LPVOID extended)
22{
23 CreateSplash(4, (Bool_t)extended);
24 if (gSplash) delete gSplash;
25 gSplash = 0;
26 return 0;
27}
28
29////////////////////////////////////////////////////////////////////////////////
30/// ctor.
31
33{
34 fHandle = 0;
35 DWORD splashId = 0;
36 fHandle = ::CreateThread( NULL, 0,&HandleSplashThread, (LPVOID)extended, 0, &splashId );
37 gSplash = this;
38}
39
40////////////////////////////////////////////////////////////////////////////////
41/// dtor
42
44{
46 TerminateThread(fHandle, 0);
47 if (fHandle) ::CloseHandle(fHandle);
48 fHandle = 0;
49}
50
bool Bool_t
Definition: RtypesCore.h:63
static DWORD WINAPI HandleSplashThread(LPVOID extended)
thread for handling Splash Screen
void DestroySplashScreen()
void CreateSplash(DWORD time, bool extended)
TWin32SplashThread * gSplash
TWin32SplashThread(Bool_t extended)
ctor.