home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectInput / DIConfig / usefuldi.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-08  |  1.3 KB  |  40 lines

  1. //-----------------------------------------------------------------------------
  2. // File: usefuldi.h
  3. //
  4. // Desc: Contains various DInput-specific utility classes and functions
  5. //       to help the UI carry its operations more easily.
  6. //
  7. // Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
  8. //-----------------------------------------------------------------------------
  9.  
  10. #ifndef __USEFULDI_H__
  11. #define __USEFULDI_H__
  12.  
  13.  
  14. struct DIDEVOBJSTRUCT {
  15.     DIDEVOBJSTRUCT() : nObjects(0), pdoi(NULL) {}
  16.     ~DIDEVOBJSTRUCT() {if (pdoi != NULL) free(pdoi);}
  17.     DWORD GetTypeFromObjID(DWORD);
  18.     int nObjects;
  19.     DIDEVICEOBJECTINSTANCEW *pdoi;
  20.     int n;
  21. };
  22. HRESULT FillDIDeviceObjectStruct(DIDEVOBJSTRUCT &os, LPDIRECTINPUTDEVICE8W pDID);
  23.  
  24. LPTSTR AllocConfigureFlagStr(DWORD dwFlags);
  25. LPTSTR AllocActionFlagStr(DWORD dwFlags);
  26. LPTSTR AllocActionHowFlagStr(DWORD dwFlags);
  27.  
  28. void CleanupActionFormatCopy(DIACTIONFORMATW &c);
  29. HRESULT CopyActionFormat(DIACTIONFORMATW &to, const DIACTIONFORMATW &from);
  30. LPDIACTIONFORMATW DupActionFormat(LPCDIACTIONFORMATW lpAcFor);
  31. void FreeActionFormatDup(LPDIACTIONFORMATW &lpAcFor);
  32.  
  33. void TraceActionFormat(LPTSTR header, const DIACTIONFORMATW &acf);
  34.  
  35. BOOL IsZeroOrInvalidColorSet(const DICOLORSET &);
  36. COLORREF D3DCOLOR2COLORREF(D3DCOLOR c);
  37.  
  38.  
  39. #endif //__USEFULDI_H__
  40.