Ejemplo n.º 1
0
void CWidget::InitDraw()
{
    if (m_bSizeChanged)
    {
        m_bSizeChanged = false;
        MoveWindow(0, 0); // Move to a safe position first
        WindowResize(this, Width(), Height());
        MoveWindow(X(), Y());
        UpdateSize();
        TUI.QueueRefresh();
    }
    
    if (m_bColorsChanged)
    {
        if (m_bFocused)
            wbkgdset(m_pNCursWin, ' ' | TUI.GetColorPair(m_FColors.first, m_FColors.second) | A_BOLD);
        else
            wbkgdset(m_pNCursWin, ' ' | TUI.GetColorPair(m_DFColors.first, m_DFColors.second) | A_BOLD);
        
        m_bColorsChanged = false;
        
        UpdateColors();
    }
    
    WindowErase(this);

    if (HasBox())
        Border(this);
}
void SinglePlayerPauseState::Enter() {
	worldState = (SinglePlayerWorldState *)engine->GetState("SinglePlayerGame");
	
	ResumeIcon.sprite	=	engine->AddSpriteAndTexture("ResumeIcon",	Rect(0,0,200,50), 0, "./Data/Textures/UI/ResumeIcon.png");
	SaveIcon.sprite		=	engine->AddSpriteAndTexture("SaveIcon",		Rect(0,0,200,50), 0, "./Data/Textures/UI/SaveIcon.png");
	QuitIcon.sprite		=	engine->AddSpriteAndTexture("QuitIcon",		Rect(0,0,200,50), 0, "./Data/Textures/UI/QuitIcon.png");
	
	ToggleButtons();
	WindowResize();
	
	activeButton = -1;
};
Ejemplo n.º 3
0
void SaveGameMenu::Enter()
{
    selectedButton = -1;

    LoadSaves("./Data/Saves");

    highlightedSave = savesList.begin();

    saveBackground.sprite = engine->AddSpriteAndTexture("saveBG", Rect(0,0,700,150), 0, "./Data/Textures/UI/SaveBG.png");
    font = engine->AddFont("Font", "./Data/Fonts/Calibri.png", Rect(0,0,14,16), 32);
    backButton.sprite			= engine->AddSpriteAndTexture("BackButton",	Rect(0,0,200,50), 0, "./Data/Textures/UI/BackIcon.png");
    playButton.sprite			= engine->AddSpriteAndTexture("SaveIcon",		Rect(0,0,200,50), 0, "./Data/Textures/UI/SaveIcon.png");
    playButton.color = Color4(1,1,1,0.5);
    backButton.color = Color4(1,1,1,0.5);

    WindowResize();
};
long FAR PASCAL _export _EasyWinProc(HWND Window, UINT Message,
                                   WPARAM WParam, LONG LParam)
{
    CrtWindow = Window;
    switch (Message)
        {
        case WM_CREATE:
            WindowCreate();
            break;
        case WM_PAINT:
            WindowPaint();
            break;
        case WM_VSCROLL:
            WindowScroll(SB_VERT, WParam, LoVal(LParam));
            break;
        case WM_HSCROLL:
            WindowScroll(SB_HORZ, WParam, LoVal(LParam));
            break;
        case WM_SIZE:
            WindowResize(LoVal(LParam), HiVal(LParam));
            break;
        case WM_GETMINMAXINFO:
            WindowMinMaxInfo((TMinMaxInfo far *) LParam);
            break;
        case WM_CHAR:
            WindowChar((char)WParam);
            break;
        case WM_KEYDOWN:
            WindowKeyDown((BYTE)WParam);
            break;
        case WM_SETFOCUS:
            WindowSetFocus();
            break;

        case WM_KILLFOCUS:
            WindowKillFocus();
            break;
        case WM_DESTROY:
            WindowDestroy();
            break;
        default:
            return DefWindowProc(Window, Message, WParam, LParam);
        }
    return NULL;
}
Ejemplo n.º 5
0
void newGameMenu::Enter() {
	WindowResize();
	
	backButton.sprite			= engine->AddSpriteAndTexture("BackButton",	Rect(0,0,200,50), 0, "./Data/Textures/UI/BackIcon.png");
	playButton.sprite			= engine->AddSpriteAndTexture("PlayButton",	Rect(0,0,200,50), 0, "./Data/Textures/UI/PlayIcon.png");
	difficultyIcons[0].sprite	= engine->AddSpriteAndTexture("EasyIcon",	Rect(0,0,64,64), 0, "./Data/Textures/UI/EasyIcon.png");
	difficultyIcons[1].sprite	= engine->AddSpriteAndTexture("MediumIcon",	Rect(0,0,64,64), 0, "./Data/Textures/UI/MediumIcon.png");
	difficultyIcons[2].sprite	= engine->AddSpriteAndTexture("HardIcon",	Rect(0,0,64,64), 0, "./Data/Textures/UI/HardIcon.png");
	
	backButton.color			= Color4(1,1,1,0.5);
	playButton.color			= Color4(1,1,1,0.5);
	
	selectedDifficulty = 1;
	selectedMenuItem = -1;
	ToggleDifficultyButtons();

	//play.LoadAudio("./Data/Audio/play.ogg");
};
Ejemplo n.º 6
0
//
//  FUNCTION: InitInstance()
//
//  PURPOSE: creates main window
//
//  COMMENTS:
//
//    In this function, we create and display the main program window.
//
BOOL InitInstance()
{
  extern bool CommandResolution;
  if(!IsEmbedded() && !CommandResolution) {
      ScreenSizeX = 800;
      ScreenSizeY = 480;
  }

#if defined(ENABLE_SDL) && defined(USE_FULLSCREEN)
 #if (SDL_MAJOR_VERSION >= 2)
  SDL_DisplayMode mode = {};
  if(SDL_GetCurrentDisplayMode(0, &mode) == 0) {
  	ScreenSizeX = mode.w;
    ScreenSizeY = mode.h;
  } else {
  	fprintf(stderr, "SDL_GetCurrentDisplayMode() has failed: %s\n", ::SDL_GetError());
  }
  #else
  	ScreenSizeX = 0;
    ScreenSizeY = 0;
  #endif
#endif

  PreloadInitialisation(true);

  RECT WindowSize;

#ifdef __linux__
  WindowSize=WindowResize(ScreenSizeX, ScreenSizeY);
#endif
#ifdef WIN32
#ifdef UNDER_CE
  WindowSize=WindowResize( GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
#else
  WindowSize=WindowResize(ScreenSizeX, ScreenSizeY);
#endif
#endif


  if (!goInstallSystem) Poco::Thread::sleep(50); // 091119
  #if TESTBENCH
  StartupStore(TEXT(". Create main window%s"),NEWLINE);
  #endif

  if(!MainWindow.Create(WindowSize)) {
      StartupStore(TEXT(". FAILURE: Create main window%s"),NEWLINE);
      return FALSE;
  }
  const PixelRect rc(MainWindow.GetClientRect());
  ScreenSizeX = rc.GetSize().cx;
  ScreenSizeY = rc.GetSize().cy;
  
  InitLKScreen();
  InitLKFonts(); // causing problems with CreateButtonLabels?

  LKLoadFixedBitmaps();
  LKLoadProfileBitmaps();
  LKObjects_Create(); 


  ButtonLabel::CreateButtonLabels(rc);
  ButtonLabel::SetLabelText(0,TEXT("MODE"));

  extern void InitLKFonts();
  // reload updating LK fonts after loading profile for fontquality
  InitLKFonts();	

  ButtonLabel::SetFont(MapWindowBoldFont);

  Message::Initialize(rc); // creates window, sets fonts

  MainWindow.SetVisible(true);

  return TRUE;
}
Ejemplo n.º 7
0
void OpenGLWindow::Initialize()
{
	glfwOpenWindow( mScreenWidth, mScreenHeight, 8,8,8,8,31,1, GLFW_WINDOW );
	WindowResize(mScreenWidth, mScreenHeight);	
	mPreviousTime = glfwGetTime();
}
Ejemplo n.º 8
0
//
//  FUNCTION: InitInstance()
//
//  PURPOSE: creates main window
//
//  COMMENTS:
//
//    In this function, we create and display the main program window.
//
BOOL InitInstance()
{
  extern bool CommandResolution;
  if(!IsEmbedded() && !CommandResolution) {
      ScreenSizeX = 800;
      ScreenSizeY = 480;
  }

#if defined(ENABLE_SDL) && defined(USE_FULLSCREEN)
 #if (SDL_MAJOR_VERSION >= 2)
  SDL_DisplayMode mode = {};
  if(SDL_GetCurrentDisplayMode(0, &mode) == 0) {
	ScreenSizeX = mode.w;
    ScreenSizeY = mode.h;
  } else {
	fprintf(stderr, "SDL_GetCurrentDisplayMode() has failed: %s\n", ::SDL_GetError());
  }
  #else
	ScreenSizeX = 0;
    ScreenSizeY = 0;
  #endif
#endif

  PreloadInitialisation(true);

  RECT WindowSize;

#ifdef __linux__
#ifdef USE_VIDEOCORE
  uint32_t iWidth, iHeight;
  if(graphics_get_display_size(0, &iWidth, &iHeight) >= 0) {
    ScreenSizeX=iWidth;
    ScreenSizeY=iHeight;
  }
#endif
#ifdef ANDROID
  const PixelSize Size = native_view->GetSize();
  ScreenSizeX=Size.cx;
  ScreenSizeY=Size.cy;
#endif


  WindowSize=WindowResize(ScreenSizeX, ScreenSizeY);
#endif
#ifdef WIN32
#if defined(UNDER_CE) || defined(USE_FULLSCREEN)
  WindowSize=WindowResize( GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
#else
  WindowSize=WindowResize(ScreenSizeX, ScreenSizeY);
#endif
#endif

  #if TESTBENCH
  StartupStore(TEXT(". Create main window%s"),NEWLINE);
  #endif

  if(!MainWindow.Create(WindowSize)) {
      StartupStore(TEXT(". FAILURE: Create main window%s"),NEWLINE);
      return FALSE;
  }
  const PixelRect rc(MainWindow.GetClientRect());
  ScreenSizeX = rc.GetSize().cx;
  ScreenSizeY = rc.GetSize().cy;
  ScreenHasChanged();

  InitLKScreen();
  InitLKFonts(); // causing problems with CreateButtonLabels?

  LKLoadFixedBitmaps();
  LKLoadProfileBitmaps();
  LKObjects_Create();

  ButtonLabel::CreateButtonLabels(rc);
  ButtonLabel::SetFont(MapWindowBoldFont);

  Message::Initialize(rc); // creates window, sets fonts

  MainWindow.SetVisible(true);

  return TRUE;
}
Ejemplo n.º 9
0
Archivo: vidrgb.cpp Proyecto: jeez/iqr
int main(int argc, char **argv)

{
  Atom                atomWMDeleteWindow;
  int	              screenNumber;
  Screen              *screen;
  Window              window;
  XWindowAttributes   windowAttributes;
  Colormap            colormap;
  PaletteInfo         paletteInfo;
  Image               image;
  XImage              *xImage;
  int                 x, y;
  int                 captureFrame;
  XEvent              event;
  bool                sizeChanged;


  // ProgramExit initialization

  display = NULL;
  v4l = -1;
  captureBuf = NULL;

  on_exit(ProgramExit, NULL);

  // Get command line options

  magnification = 1;

  if (argc > 1) {
    magnification = atoi(argv[1]);
  } // end if

  magnification = max(1, magnification);

  printf("Magnification is %i\n", magnification);

  // Open display

  if ((display = XOpenDisplay(NULL)) == NULL) { // NULL for DISPLAY
    printf("Error: XOpenDisplay() failed\n");
    exit(1);
  } // end if

  screenNumber = DefaultScreen(display);

  screen = XScreenOfDisplay(display, screenNumber);

  // Obtain WM protocols atom for ClientMessage exit event

  if ((atomWMDeleteWindow = XInternAtom(display, AtomWMDeleteWindowName, True)) == None) {
    printf("Error: %s atom does not exist\n", AtomWMDeleteWindowName);
    exit(1);
  } // end if

  // Create window, inheriting depth and visual from root window

  window = XCreateSimpleWindow(
    display,
    RootWindowOfScreen(screen),
    0, // x
    0, // y
    640, // width
    480, // height
    0,                          // border width
    BlackPixelOfScreen(screen), // border
    BlackPixelOfScreen(screen)  // background
    );

  XStoreName(display, window, "V4L RGB Test");

  XGetWindowAttributes(display, window, &windowAttributes);

  if (((windowAttributes.depth == 8) && (windowAttributes.visual->c_class != PseudoColor)) ||
      ((windowAttributes.depth > 8) && (windowAttributes.visual->c_class != TrueColor))) {
    printf("Error: Visual not supported\n");
    exit(1);
  } // end if

  // Create PseudoColor HI240 colormap, if needed

  if (windowAttributes.depth == 8) {
    colormap = XCreateColormap(display, window, windowAttributes.visual, AllocAll);
    paletteInfo.display = display;
    paletteInfo.colormap = colormap;
    Hi240BuildPalette((ulong) 0x10000, (Hi240StorePaletteEntry *) StoreColormapEntry, &paletteInfo);
    XSetWindowColormap(display, window, colormap);
  } // end if

  // Create image

  if (image.Create(
    display,
    window, // Defines visual, depth
    MaxImageWidth,
    MaxImageHeight,
    True // MITSHM
    ) < 0) {
    printf("Error: image.Create() failed\n");
    exit(1);
  } // end if

  image.Clear();

#if (1)
  printf("\nDisplay:\n");
  printf("Image byte order = %s\n", ByteOrderName(ImageByteOrder(display)));
  printf("Bitmap unit      = %i\n", BitmapUnit(display));
  printf("Bitmap bit order = %s\n", ByteOrderName(BitmapBitOrder(display)));
  printf("Bitmap pad       = %i\n", BitmapPad(display));

  printf("\nWindow:\n");
  printf("Depth            = %i\n", windowAttributes.depth);
  printf("Visual ID        = 0x%02x\n", windowAttributes.visual->visualid);
  printf("Visual class     = %s\n", VisualClassName(windowAttributes.visual->c_class));
  printf("Red mask         = 0x%08lx\n", windowAttributes.visual->red_mask);
  printf("Green mask       = 0x%08lx\n", windowAttributes.visual->green_mask);
  printf("Blue mask        = 0x%08lx\n", windowAttributes.visual->blue_mask);
  printf("Bits per R/G/B   = %i\n", windowAttributes.visual->bits_per_rgb); // log2 # colors

  xImage = image.X();
  printf("\nImage:\n");
  printf("Image byte order = %s\n", ByteOrderName(xImage->byte_order));
  printf("Bitmap unit      = %i\n", xImage->bitmap_unit);
  printf("Bitmap bit order = %s\n", ByteOrderName(xImage->bitmap_bit_order));
  printf("Bitmap pad       = %i\n", xImage->bitmap_pad);
  printf("Depth            = %i\n", xImage->depth);
  printf("Red mask         = 0x%08lx\n", xImage->red_mask);
  printf("Green mask       = 0x%08lx\n", xImage->green_mask);
  printf("Blue mask        = 0x%08lx\n", xImage->blue_mask);
  printf("Bits per pixel   = %i\n", xImage->bits_per_pixel); // ZPixmap
  printf("Bytes per line   = %i\n", xImage->bytes_per_line);
  printf("IsShared         = %s\n", image.IsShared() ? "True" : "False");
  printf("HasSharedPixmap  = %s\n", image.HasSharedPixmap() ? "True" : "False");
#endif

  // V4L stuff

  if ((v4l = open(BigPictureDevice, O_RDWR)) < 0) {
    printf("Error: Can't open %s: %s\n", BigPictureDevice, strerror(errno));
    exit(1);
  } // end if

  if (V4LMGetMMInfo(v4l, &v4lMMInfo) < 0) {
    printf("Error: V4LMGetMMInfo: %s\n", strerror(errno));
    exit(1);
  } // end if
#if (0)
  printf("Capture buffer size   = %i\n", v4lMMInfo.size);
  printf("Capture buffer frames = %i\n", v4lMMInfo.frames);
#endif
  if (v4lMMInfo.frames < 2) {
    printf("Error: V4LMGetMMInfo: frames < 2\n");
    exit(1);
  } // end if

  if ((captureBuf = (bits8 *) mmap(0, v4lMMInfo.size, PROT_READ | PROT_WRITE, MAP_SHARED, v4l, 0)) == MAP_FAILED) {
    printf("Error: mmap(): %s\n", strerror(errno));
    exit(1);
  } // end if

  if (V4LSetSource(v4l, BigPictureCompositeSource, VIDEO_MODE_NTSC) < 0) {
    printf("Error: V4LSetSource: %s\n", strerror(errno));
    exit(1);
  } // end if

  if (V4LGetCaps(v4l, &v4lCaps) < 0) {
    printf("Error: V4LGetCaps: %s\n", strerror(errno));
    exit(1);
  } // end if

  // Select V4L RGB capture format to exactly match image/visual (no LUTs!)

  if ((captureFormat = XImageCaptureFormat(image.X())) < 0) {
    printf("Error: No  match for visual/image\n");
    exit(1);
  } // end if

  // Initialize capture size based on window size

  windowWidth = windowAttributes.width;
  windowHeight = windowAttributes.height;;

  WindowResize(v4l, windowWidth, windowHeight, magnification); // Does V4LMSetFormat().

  // Initialize picture attributes to mid-range

  V4LSetBrightness(v4l, 65535 / 2);
  V4LSetContrast(v4l, 65535 / 2);
  V4LSetSaturation(v4l, 65535 / 2);
  V4LSetHue(v4l, 65535 / 2);

  // Ready to start: Display window, select events, and initiate capture sequence

  XMapRaised(display, window);

  XSetWMProtocols(display, window, &atomWMDeleteWindow, 1);

  XSelectInput(display, window, StructureNotifyMask | ExposureMask);

  captureFrame = 0;

  if (V4LMCapture(v4l, captureFrame) < 0) {
    printf("Error: V4LMCapture: %s\n", strerror(errno));
    exit(1);
  } // end if

  while (1) {

    if (XPending(display) > 0) {

      XNextEvent(display, &event);

      switch (event.type) {
      case ClientMessage: // From WM
	if (event.xclient.data.l[0] == atomWMDeleteWindow) {
	  exit(0);
	} // end if
	break;
      case ConfigureNotify:
	sizeChanged = false;
	if (event.xconfigure.width != windowWidth) {
	  sizeChanged = true;
	  windowWidth = event.xconfigure.width;
	} // end if
	if (event.xconfigure.height != windowHeight) {
	  sizeChanged = true;
	  windowHeight = event.xconfigure.height;
	} // end if
	if (sizeChanged) {
	  image.Clear();
	  XClearWindow(display, window);
	  WindowResize(v4l, windowWidth, windowHeight, magnification);
	} // end if
	break;
      case Expose:
	if (event.xexpose.count == 0) {
	  Put(window, image);
	} // end if
	break;
      } // end switch

    } else {

      // Wait for this frame

      if (V4LMSync(v4l, captureFrame) < 0) {
	printf("Error: V4LMSync: %s\n", strerror(errno));
	exit(1);
      } // end if

      // Start capture for next frame

      if (V4LMCapture(v4l, 1 - captureFrame) < 0) {
	printf("Error: V4LMCapture: %s\n", strerror(errno));
	exit(1);
      } // end if

      Draw(image, captureBuf + v4lMMInfo.offsets[captureFrame], magnification);

      Put(window, image);

      captureFrame = 1 - captureFrame; // 0<->1

    } // endif 

  } // end while

  printf("Error: Fell out of event loop!\n");

  exit(1);

} // end main
Ejemplo n.º 10
0
void CD3DApp::Init(HINSTANCE hInst, TCHAR * szClassName, TCHAR * szTitleText,
		WORD wWndPosX, WORD wWndPosY, WORD wWndWidth, WORD wWndHeight, void (*onResizeWindowFunction)())
{
	m_hInst = hInst;
	m_wWndPosX = wWndPosX;
	m_wWndPosY = wWndPosY, 	
	m_bFullscreen = 0;
	m_bPaused = 0; 
	m_pDinput = 0;
	m_pKeyboard = 0; 
	m_pMouse = 0;
	m_fpnOnResizeWindow = onResizeWindowFunction;

	GetCurrentDirectoryA(MAX_PATH, g_szFileDir);

	g_uiWndWidth = wWndWidth;
	g_uiWndHeight = wWndHeight;

	//////////////////////////////
	//Window initialization
	DWORD len = wcslen(szClassName);
	m_szWndClassName = new TCHAR[len+1];
	wcscpy(m_szWndClassName, szClassName);

	len = wcslen(szTitleText);
	m_szWndTitleText = new TCHAR[len+1];
	wcscpy(m_szWndTitleText, szTitleText);

	WNDCLASSW wc;
	wc.hInstance = m_hInst;
	wc.lpfnWndProc = WndProc;
	wc.lpszClassName = m_szWndClassName;
	wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
	wc.hCursor = LoadCursor(NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH)(BLACK_BRUSH);
	wc.style = CS_CLASSDC;
	wc.lpszMenuName = NULL;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;

	RegisterClassW(&wc);

	RECT rect = {0, 0, g_uiWndWidth, g_uiWndHeight};
	AdjustWindowRect(&rect, WS_CAPTION | WS_SYSMENU | WS_SIZEBOX | WS_MINIMIZEBOX, TRUE);
	g_hWnd = CreateWindow(m_szWndClassName, m_szWndTitleText, WS_CAPTION | WS_SYSMENU | WS_SIZEBOX | WS_MINIMIZEBOX,
		m_wWndPosX, m_wWndPosY, (rect.right - rect.left), (rect.bottom - rect.top), NULL, NULL, m_hInst, NULL);

	if (!g_hWnd) {
		DxUtSendError("Window could not be created."); }

	UpdateWindow(g_hWnd);

	//////////////////////////////
	//Direct3D10 initialization
		DXGI_SWAP_CHAIN_DESC desc;
	desc.BufferCount = 1;
	desc.BufferDesc.Width = g_uiWndWidth;
	desc.BufferDesc.Height = g_uiWndHeight;
	desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
	desc.BufferDesc.RefreshRate.Denominator = 60;
	desc.BufferDesc.RefreshRate.Numerator = 1;
	desc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
	desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
	desc.Flags = NULL;
	desc.OutputWindow = g_hWnd;
	desc.SampleDesc.Count = 1;
	desc.SampleDesc.Quality = 0;
	desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
	desc.Windowed = TRUE;

	UINT flags = 0;
#if defined(DEBUG) || defined(_DEBUG)  
    flags |= D3D10_CREATE_DEVICE_DEBUG;
#endif

	if (FAILED(D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, flags, D3D10_SDK_VERSION, &desc, &g_pSwapChain, &g_pD3DDevice))) {
		DxUtSendError("Direct3D device could not be created.");
	}

	WindowResize();

	if (FAILED(DirectInput8Create(m_hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&m_pDinput, NULL))) {
		DxUtSendError("Dinput8 could not be created."); }

	if (FAILED(m_pDinput->CreateDevice(GUID_SysKeyboard, &m_pKeyboard, NULL))) {
		DxUtSendError("Dinput8 could not be create keyboard."); }
	if (FAILED(m_pKeyboard->SetDataFormat(&c_dfDIKeyboard))) {
		DxUtSendError("Keyboard could not set format."); }
	if (FAILED(m_pKeyboard->SetCooperativeLevel(g_hWnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE))) {
		DxUtSendError("Keyboard could not set cooperative level."); }
	m_pKeyboard->Acquire();

	if (FAILED(m_pDinput->CreateDevice(GUID_SysMouse, &m_pMouse, NULL))) {
		DxUtSendError("Dinput8 could not be create mouse."); }
	if (FAILED(m_pMouse->SetDataFormat(&c_dfDIMouse))) {
		DxUtSendError("Mouse could not set format."); }
	if (FAILED(m_pMouse->SetCooperativeLevel(g_hWnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE))) {
		DxUtSendError("Mouse could not set cooperative level."); }
	m_pMouse->Acquire();

	QueryPerformanceCounter((LARGE_INTEGER*)&m_liCountNum);

	ShowWindow(g_hWnd, SW_SHOWDEFAULT);
}