Skip to content
Snippets Groups Projects
Commit 32f14bb7 authored by Rene Brun's avatar Rene Brun
Browse files

New classes for supporting the new splash screen on windows

git-svn-id: http://root.cern.ch/svn/root/trunk@7902 27541ba8-7e3a-0410-8455-c3a389f83636
parent 8fd1cbf8
No related branches found
No related tags found
No related merge requests found
/*************************************************************************
* Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TWin32SplashThread
#define ROOT_TWin32SplashThread
#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
///////////////////////////////////////////////////////////////////////////////
class TWin32SplashThread {
public:
void *fHandle; // splash thread handle
TWin32SplashThread(Bool_t extended);
~TWin32SplashThread();
};
R__EXTERN TWin32SplashThread *gSplash;
#endif
\ No newline at end of file
/*************************************************************************
* Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#include "Windows4Root.h"
#include "TWin32SplashThread.h"
TWin32SplashThread *gSplash = 0;
extern void CreateSplash(DWORD time, BOOL extended);
//______________________________________________________________________________
static DWORD WINAPI HandleSplashThread(LPVOID extended)
{
// thread for handling Splash Screen
CreateSplash(7, (Bool_t)extended);
::ExitThread(0);
if (gSplash) delete gSplash;
gSplash = 0;
return 0;
}
//______________________________________________________________________________
TWin32SplashThread::TWin32SplashThread(Bool_t extended)
{
//
fHandle = 0;
DWORD splashId = 0;
fHandle = ::CreateThread( NULL, 0,&HandleSplashThread, (LPVOID)extended, 0, &splashId );
gSplash = this;
}
//______________________________________________________________________________
TWin32SplashThread::~TWin32SplashThread()
{
// dtor
if (fHandle) ::CloseHandle(fHandle);
fHandle = 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment