   Buffred mouse problem
  I got buffered mouse code setup and i get no errors but i also get no response to from the mouse it doesn't move or anything.my variables  LPDIRECTINPUT8  pDInput;LPDIRECTINPUTDEVICE8 pMouse;intxPos, yPos;DIDEVICEOBJECTDATA   Mouse_Buffer[10];DWORDnumofelements; my setup code if(FAILED(DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&pDInput, NULL))) {MessageBox(Window, "DirectInput8Create failed","Error", MB_OK);}if(FAILED(pDInput->CreateDevice(GUID_SysMouse, &pMouse, NULL))) {MessageBox(Window, "CreateDevice mouse failed", "Error",    MB_OK);}if(FAILED(pMouse->SetDataFormat(&c_dfDIMouse))) {MessageBox(Window, "SetDataFormat mouse failed",    "Error", MB_OK);}if(FAILED(pMouse->SetCooperativeLevel(Window, DISCL_EXCLUSIVE |    DISCL_FOREGROUND))) {MessageBox(Window, "SetCooperativeLevel mouse failed",    "Error", MB_OK);}DIPROPDWORD blahblah.diph.dwSize= sizeof(DIPROPDWORD);blah.diph.dwHeaderSize= sizeof(DIPROPHEADER);blah.diph.dwObj= 0;blah.diph.dwHow= DIPH_DEVICE;blah.dwData= 10;if(FAILED(pMouse->SetProperty(DIPROP_BUFFERSIZE, &blah.diph))) {MessageBox(Window, "SetPorperty mouse failed", "Error",    MB_OK);}if(FAILED(pMouse->Acquire())) { MessageBox(Window, "Acqurie mouse failed", "Error",MB_OK);}my buffred input code    numofelements = 0;hr = pMouse->GetDeviceData(sizeof(DIDEVICEOBJECTDATA),   Mouse_Buffer, &numofelements, 0);if(hr != DI_OK) {if(hr != DI_BUFFEROVERFLOW) {MessageBox(NULL, "hr != DI_OK or   DI_BUFFEROVERFLOW", "Error",   MB_OK);}}for(DWORD i = 0; i < numofelements; i++){switch(Mouse_Buffer[i].dwOfs) {case DIMOFS_X:xPos += Mouse_Buffer[i].dwData;case DIMOFS_Y:yPos += Mouse_Buffer[i].dwData;}}Any info on what I'm doing wrong would be nice[edited by - mortizar on February 19, 2004 3:22:14 PM]
   Anyone at all know what I''m doing wrong? 