36static char className[] =
"G4Win32";
38G4Win32* G4Win32::instance = NULL;
41static HWND topWindow = NULL;
59 if(Win32Inited==
FALSE) {
62 wc.style = CS_HREDRAW | CS_VREDRAW;
63 wc.lpfnWndProc = (WNDPROC)DefWindowProc;
66 wc.hInstance = ::GetModuleHandle(NULL);
67 wc.hIcon = LoadIcon (NULL,IDI_APPLICATION);
68 wc.hCursor = LoadCursor(NULL,IDC_ARROW);
69 wc.hbrBackground = GetStockBrush(BLACK_BRUSH);
70 wc.lpszMenuName = className;
71 wc.lpszClassName = className;
72 ::RegisterClass (&wc);
74 topWindow = ::CreateWindowEx(WS_EX_CLIENTEDGE,
84 ::GetModuleHandle(NULL),
88 G4cout <<
"G4Win32: Unable to create Win32 window." <<
G4endl;
122 BOOL status = ::GetMessage(&event, NULL, 0, 0);
123 if(status==
FALSE)
return NULL;
133 while ( ::PeekMessage(&event, NULL, 0, 0, PM_REMOVE) ) {
134 ::TranslateMessage(&event);
135 ::DispatchMessage (&event);
145 ::TranslateMessage((MSG*)a_event);
146 ::DispatchMessage ((MSG*)a_event);
G4bool(* G4DispatchFunction)(void *)
G4GLOB_DLL std::ostream G4cout
void AddDispatcher(G4DispatchFunction)
void SetMainInteractor(G4Interactor)
static G4bool DispatchWin32Event(void *)
static G4Win32 * getInstance()
void FlushAndWaitExecution()