• Advertisement
Sign in to follow this  

Problem with Fraps-like programs

This topic is 4592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I'm have a little problem with apps like Fraps, or NVPerfHUD, which need to have access to my DirectX device. When i run my program, in CreateWindowEx throws an access violation (only if Fraps-like program is still launched). What i'm doing wrong ? I'm registering class with :
  WNDCLASSEX wc;
  wc.cbSize = sizeof (WNDCLASSEX);
  wc.style = CS_CLASSDC;
  wc.lpfnWndProc = WindowProc;
  wc.cbClsExtra = 0;
  wc.cbWndExtra = 0;
  wc.hInstance = hInstance;
  wc.hIcon = LoadIcon (NULL, IDI_APPLICATION);
  wc.hCursor = (HCURSOR)LoadCursor (NULL, IDC_ARROW);
  wc.hbrBackground = (HBRUSH)GetStockObject (BLACK_BRUSH);
  wc.lpszMenuName = NULL;
  wc.lpszClassName = CLASSNAME;
  wc.hIconSm = NULL;

  if (!RegisterClassEx (&wc))
  {
    return false;
  }
  return true;
and create window with :
  wnd = CreateWindowEx (NULL, CLASSNAME, TEXT ("Full Of Fire Game"), 
      WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
      0, 0, width, height, GetDesktopWindow (), NULL, hInstance, NULL);

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement