Skip to main content
GameDev.net gamedev.net
🔒 Locked

Direct input problem

Started by TheMac Dec 29, 2004 at 2:17 PM 0 replies 250+ views
Original Post
TheMac
TheMac
For what ever reason my mouse does not show up. I don't get any errors when the code runs. everything seems to work, but the mouse does not show up. I've also not only tried DI to load different cursors, but also used GDI with functions like LoadCursor, etc still did not work. When I click on the left mouse button, the program catches it and gives me a message saying I clicked on the left mouse button. So the problem is the mouse just isn't showing up. hr = m_lpDID->CreateDevice(GUID_SysMouse, &m_Mouse, NULL); hr = m_Mouse->SetDataFormat(&c_dfDIMouse2); hr = m_Mouse->SetCooperativeLevel(hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND); hr = m_Mouse->Acquire(); // Customizing mouse settings D3DXIMAGE_INFO imCur; D3DXGetImageInfoFromFile("C:\\image2.bmp", &imCur); hr = m_Device->CreateOffscreenPlainSurface(imCur.Width, imCur.Height, imCur.Format, D3DPOOL_DEFAULT, &m_MouseCur, NULL); hr = D3DXLoadSurfaceFromFile(m_MouseCur, NULL, NULL, "C:\\image2.bmp", NULL, D3DX_DEFAULT, 0xFF000000, NULL); hr = m_Device->SetCursorProperties(0, 0, m_MouseCur); m_Device->SetCursorPosition(0, 0, D3DCURSOR_IMMEDIATE_UPDATE); SetCursor(NULL); m_Device->ShowCursor(true); I've tried different jpgs and bmps, still didn't help. Has anyone seen this problem before? The funny this is that the same problem occurs when I use GDI to display a cursor.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.