// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // // // $Id: G4Win32.cc,v 1.6 2001/07/11 10:01:23 gunter Exp $ // GEANT4 tag $Name: geant4-05-00 $ // // G.Barrand #if defined(G4INTY_BUILD_WIN32) || defined(G4INTY_USE_WIN32) #include #include "G4ios.hh" #include "G4UImanager.hh" #include "G4Win32.hh" static char className[] = "G4Win32"; G4Win32* G4Win32::instance = NULL; static G4bool Win32Inited = FALSE; static HINSTANCE hInstance = NULL; static HINSTANCE hPrevInstance = NULL; static LPTSTR lpszCmdLine = NULL; static int nCmdShow = 0; static HWND topWindow = NULL; /***************************************************************************/ G4Win32* G4Win32::getInstance ( ) /***************************************************************************/ /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ { return G4Win32::getInstance(NULL,NULL,NULL,0); } /***************************************************************************/ G4Win32* G4Win32::getInstance ( HINSTANCE a_hInstance ,HINSTANCE a_hPrevInstance ,LPSTR a_lpszCmdLine ,int a_nCmdShow ) /***************************************************************************/ /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ { if (instance==NULL) { instance = new G4Win32(a_hInstance, a_hPrevInstance, a_lpszCmdLine, a_nCmdShow); } return instance; } /***************************************************************************/ G4Win32::G4Win32 ( HINSTANCE a_hInstance ,HINSTANCE a_hPrevInstance ,LPSTR a_lpszCmdLine ,int a_nCmdShow ) /***************************************************************************/ /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ { if(Win32Inited==FALSE) { // Should be Done once. hInstance = a_hInstance; hPrevInstance = a_hPrevInstance; lpszCmdLine = a_lpszCmdLine; nCmdShow = a_nCmdShow; if(hInstance==NULL) { G4cout << "G4Win32::G4Win32 : NULL hInstance given." <