////////////DRAW MOUSE
void DrawMouse(DWORD color, LPDIRECT3DDEVICE9 pDevice){
POINT myCursor;
GetCursorPos(&myCursor);
//ScreenToClient(GetForegroundWindow(),&myCursor);
int X[29] = { 0, 1, 2, 3, 4, 2,5, 3, 6, 4, 7, 5, 8, 6, 9, 10, 6, 11, 5, 8, 3, 8, 2, 4, 9, 1, 5, 10, 5 };
int Y[29] = { 0, 1, 2, 3, 4, 5,5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 14, 15, 16, 16, 17 };
int W[29] = { 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 1, 1, 1, 1, 1, 1, 1, 1, 5 };
int H[29] = { 16, 1, 1, 1, 1, 7,1, 5, 1, 5, 1, 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1 };
D3DRECT rec;
for (int i = 0; i < 29; i++)
{
rec.x1 = myCursor.x + X[i];
rec.x2 = myCursor.x + X[i] + W[i];
rec.y1 = myCursor.y + Y[i];
rec.y2 = myCursor.y + Y[i] + H[i];
pDevice->Clear(1, &rec, D3DCLEAR_TARGET, color, 0, 0);
}
}