ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
13 TWin32SplashThread *gSplash = 0;
14 
15 extern void CreateSplash(DWORD time, BOOL extended);
16 extern void DestroySplashScreen();
17 
18 ////////////////////////////////////////////////////////////////////////////////
19 /// thread for handling Splash Screen
20 
21 static 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 
TWin32SplashThread(Bool_t extended)
ctor.
void CreateSplash(DWORD time, BOOL extended)
TWin32SplashThread * gSplash
bool Bool_t
Definition: RtypesCore.h:59
void DestroySplashScreen()
#define NULL
Definition: Rtypes.h:82
static DWORD WINAPI HandleSplashThread(LPVOID extended)
thread for handling Splash Screen