// -------------------------------------------------------------------------- // ========================================================================== // File: TDIObjectDataFormat.CPP // Authors: BCB_Code_Generator v1.70, // Darren Dwyer (source code, documentation, demos, website), // Hugh Edwards (documentation, icons, website), // Brian Austin (some source code, documentation) // Description: This file contains the code for the TDIObjectDataFormat // Component // // "TDx_Input_Library v1.70" // (c) 2003 BCB-Tools.com Pty. Ltd., Sydney, Australia. // All Rights Reserved. // // Refer to the 'Licence.Txt' file for licencing & copyright information. // ========================================================================== // -------------------------------------------------------------------------- // #includes ... // -------------------------------------------------------------------------- #include #pragma hdrstop // -------------------------------------------------------------------------- #include "TDIObjectDataFormat.H" // -------------------------------------------------------------------------- #pragma link "TDx_Library_Defns" #pragma link "TDx_Library_Functions" #pragma link "TDx_Input_Library_Defns" #pragma link "TDx_Input_Library_Functions" // -------------------------------------------------------------------------- // Object Registration... // -------------------------------------------------------------------------- #if (__BORLANDC__ >= 0x0530) // BCB Version 3+ #pragma package(smart_init) #endif // -------------------------------------------------------------------------- static inline void ValidCtrCheck(TDIObjectDataFormat*) { new TDIObjectDataFormat(NULL); } // -------------------------------------------------------------------------- namespace Tdiobjectdataformat { #if (__BORLANDC__ >= 0x0530) // BCB Version 3+ void __fastcall PACKAGE Register() #else void __fastcall Register() #endif { TComponentClass classes[1] = {__classid(TDIObjectDataFormat)}; RegisterComponents("TDx_Input", classes, 0); } } // -------------------------------------------------------------------------- // Constructor: TDIObjectDataFormat::TDIObjectDataFormat() // Description: The default constructor for the TDIObjectDataFormat object. // -------------------------------------------------------------------------- __fastcall TDIObjectDataFormat::TDIObjectDataFormat(TComponent* Owner) : TComponent(Owner) { fDIOBJECTDATAFORMAT=NULL; fArraySize=0; ArraySize=1; ClearAll(); fFlags_Strings=NULL; fType_Strings=NULL; } // -------------------------------------------------------------------------- // Destructor: TDIObjectDataFormat::~TDIObjectDataFormat() // Description: The destructor for the TDIObjectDataFormat object. // -------------------------------------------------------------------------- __fastcall TDIObjectDataFormat::~TDIObjectDataFormat() { // destroy internals if (ArraySize!=0) ArraySize = 0; if (fFlags_Strings!=NULL) delete fFlags_Strings; if (fType_Strings!=NULL) delete fType_Strings; } // -------------------------------------------------------------------------- // Property: ArraySize // Description: The ArraySize property contains the number of internal // DIOBJECTDATAFORMAT structures wrapped inside the // TDIObjectDataFormat component. // By default the ArraySize is initialized to 1, meaning that // this TDIObjectDataFormat component wraps a single // DIOBJECTDATAFORMAT structure. To wrap multiple structures, // set the TDIObjectDataFormat::ArraySize to the total number of // internal structures desired. // -------------------------------------------------------------------------- dword __fastcall TDIObjectDataFormat::FGetArraySize() { return fArraySize; } // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::FSetArraySize( dword pArraySize ) { // check for size==0 if (pArraySize==0) { // de-allocate old memory delete[] fDIOBJECTDATAFORMAT; fDIOBJECTDATAFORMAT = NULL; fArraySize = 0; return; } // is anything allocated? if (fArraySize==0) { // nope. need to allocate memory for pointers to internal structures fDIOBJECTDATAFORMAT = new DIOBJECTDATAFORMAT[pArraySize]; if (fDIOBJECTDATAFORMAT==NULL) { fArraySize = 0; fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDIOBJECTDATAFORMAT::FSetArraySize()", "TDX_ERROR", "Could not allocate memory for storing internal DIOBJECTDATAFORMAT structure pointers."); return; } // setup defaults fArraySize = pArraySize; ClearAll(); } else // already allocated... has the size increased? if (pArraySize>fArraySize) { // allocate space for the new structures DIOBJECTDATAFORMAT* temp_DIOBJECTDATAFORMAT = new DIOBJECTDATAFORMAT[pArraySize]; if (temp_DIOBJECTDATAFORMAT==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDIOBJECTDATAFORMAT::FSetArraySize()", "TDX_ERROR", "Could not allocate extra memory for storing internal DIOBJECTDATAFORMAT structures."); return; } // clear new data areas ZeroMemory( &temp_DIOBJECTDATAFORMAT[fArraySize], sizeof(DIOBJECTDATAFORMAT)*(pArraySize-fArraySize) ); // duplicate existing data CopyMemory( &temp_DIOBJECTDATAFORMAT[0], &fDIOBJECTDATAFORMAT[0], sizeof(DIOBJECTDATAFORMAT)*fArraySize); // de-allocate old memory delete[] fDIOBJECTDATAFORMAT; // re-assign the new memory fDIOBJECTDATAFORMAT = temp_DIOBJECTDATAFORMAT; // store new array size fArraySize = pArraySize; } else // already allocated... has the size reduced? if (pArraySize=fArraySize) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FGetFlags()", "TDX_ERROR", "Supplied index ["+IntToStr(pArrayIndex)+"] is out of bounds [0.."+IntToStr(fArraySize-1)+"]"); return (dword) NULL; } return fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags; } // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::FSetFlags( dword pArrayIndex, dword pFlags ) { // array is allocated? if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FSetFlags()", "TDX_ERROR", "Internal Array size is 0."); return; } // range check supplied index if (pArrayIndex>=fArraySize) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FSetFlags()", "TDX_ERROR", "Supplied index ["+IntToStr(pArrayIndex)+"] is out of bounds [0.."+IntToStr(fArraySize-1)+"]"); return; } fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags = pFlags; } // -------------------------------------------------------------------------- // Property: Guid // Description: The Guid property identifies an object (axis, button, or // other input source). // // When requesting a data format, making this property NULL // indicates that any type of object is permissible. // // Possible values include: // // GUID_XAxis the left-right motion of a mouse. // GUID_YAxis forward-backward motion of a mouse. // GUID_ZAxis the wheel on a mouse // GUID_RxAxis Rotation around the x-axis. // GUID_RyAxis Rotation around the y-axis. // GUID_RzAxis Rotation around the z-axis. // GUID_Slider A slider axis. // GUID_Button A mouse button. // GUID_Key A keyboard key. // GUID_POV A point-of-view indicator. // GUID_Unknown Unknown. // -------------------------------------------------------------------------- const GUID* __fastcall TDIObjectDataFormat::FGetGuid( dword pArrayIndex ) { // array is allocated? if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FGetGuid()", "TDX_ERROR", "Internal Array size is 0."); return (const GUID*) NULL; } // range check supplied index if (pArrayIndex>=fArraySize) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FGetGuid()", "TDX_ERROR", "Supplied index ["+IntToStr(pArrayIndex)+"] is out of bounds [0.."+IntToStr(fArraySize-1)+"]"); return (const GUID*) NULL; } return fDIOBJECTDATAFORMAT[pArrayIndex].pguid; } // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::FSetGuid( dword pArrayIndex, const GUID* pGuid ) { // array is allocated? if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FSetGuid()", "TDX_ERROR", "Internal Array size is 0."); return; } // range check supplied index if (pArrayIndex>=fArraySize) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FSetGuid()", "TDX_ERROR", "Supplied index ["+IntToStr(pArrayIndex)+"] is out of bounds [0.."+IntToStr(fArraySize-1)+"]"); return; } fDIOBJECTDATAFORMAT[pArrayIndex].pguid = pGuid; } // -------------------------------------------------------------------------- // Property: Ofs // Description: The Ofs property defines the data packet offset, in bytes, // where the objects data can be found. // // This property must be a multiple of four for dword size data // like axes, or byte aligned for buttons. // -------------------------------------------------------------------------- dword __fastcall TDIObjectDataFormat::FGetOfs( dword pArrayIndex ) { // array is allocated? if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FGetOfs()", "TDX_ERROR", "Internal Array size is 0."); return (dword) NULL; } // range check supplied index if (pArrayIndex>=fArraySize) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FGetOfs()", "TDX_ERROR", "Supplied index ["+IntToStr(pArrayIndex)+"] is out of bounds [0.."+IntToStr(fArraySize-1)+"]"); return (dword) NULL; } return fDIOBJECTDATAFORMAT[pArrayIndex].dwOfs; } // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::FSetOfs( dword pArrayIndex, dword pOfs ) { // array is allocated? if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FSetOfs()", "TDX_ERROR", "Internal Array size is 0."); return; } // range check supplied index if (pArrayIndex>=fArraySize) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FSetOfs()", "TDX_ERROR", "Supplied index ["+IntToStr(pArrayIndex)+"] is out of bounds [0.."+IntToStr(fArraySize-1)+"]"); return; } fDIOBJECTDATAFORMAT[pArrayIndex].dwOfs = pOfs; } // -------------------------------------------------------------------------- // Property: Size // Description: The Size property contains the size in bytes of a single // internal DIOBJECTDATAFORMAT structure. // -------------------------------------------------------------------------- dword __fastcall TDIObjectDataFormat::FGetSize() { return fSize; } // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::FSetSize( dword pSize ) { fSize = pSize; } // -------------------------------------------------------------------------- // Property: SizeAll // Description: The SizeAll property contains the size in bytes of all // internal DIOBJECTDATAFORMAT structures. This result is the // same as multiplying TDIObjectDataFormat::ArraySize and // TDIObjectDataFormat::Size. // -------------------------------------------------------------------------- dword __fastcall TDIObjectDataFormat::FGetSizeAll() { return fArraySize * fSize; } // -------------------------------------------------------------------------- // Property: Type // Description: The Type property is unusual, in that it defines flags // indicating the object type and it also identifies the object // instance number in the middle 16 bits. // // Set the instance portion to DIDFT_ANYINSTANCE or // DIDFT_MAKEINSTANCE(n) when requesting a data format to // indicate either that any instance is permissible or to // restrict the request to a specific instance. // // The object instance number can be extracted using the // DIDFT_GETINSTANCE macro: // // DIDFT_GETINSTANCE(n) LOWORD((n) >> 8) // // where n is one of the TDIObjectDataFormat::Type flag values. // // The described effect applies when the flag is set. // Flags: DIDFT_ABSAXIS - // The object selected by TDx_Input::SetDataFormat() must be // an absolute axis. // DIDFT_AXIS - // The object selected by TDx_Input::SetDataFormat() must be // an absolute or relative axis. // DIDFT_BUTTON - // The object selected by TDx_Input::SetDataFormat() must be a // push or toggle button. // DIDFT_FFACTUATOR - // The object selected by TDx_Input::SetDataFormat() must // contain a force feedback actuator so that it is possible to // apply forces to the object. // DIDFT_FFEFFECTTRIGGER - // The object selected by TDx_Input::SetDataFormat() must be a // valid force feedback effect trigger. // DIDFT_POV - // The object selected by TDx_Input::SetDataFormat() must be a // point of view controller. // DIDFT_PSHBUTTON - // The object selected by TDx_Input::SetDataFormat() must be a // push button. // DIDFT_RELAXIS - // The object selected by TDx_InputDevice::SetDataFormat() // must be a relative axis. // DIDFT_TGLBUTTON - // The object selected by TDx_InputDevice::SetDataFormat() // must be a toggle button. // DIDFT_VENDORDEFINED - // The object selected by TDx_InputDevice::SetDataFormat() // must be manufacturer defined. // -------------------------------------------------------------------------- dword __fastcall TDIObjectDataFormat::FGetType( dword pArrayIndex ) { // array is allocated? if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FGetType()", "TDX_ERROR", "Internal Array size is 0."); return (dword) NULL; } // range check supplied index if (pArrayIndex>=fArraySize) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FGetType()", "TDX_ERROR", "Supplied index ["+IntToStr(pArrayIndex)+"] is out of bounds [0.."+IntToStr(fArraySize-1)+"]"); return (dword) NULL; } return fDIOBJECTDATAFORMAT[pArrayIndex].dwType; } // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::FSetType( dword pArrayIndex, dword pType ) { // array is allocated? if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FSetType()", "TDX_ERROR", "Internal Array size is 0."); return; } // range check supplied index if (pArrayIndex>=fArraySize) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::FSetType()", "TDX_ERROR", "Supplied index ["+IntToStr(pArrayIndex)+"] is out of bounds [0.."+IntToStr(fArraySize-1)+"]"); return; } fDIOBJECTDATAFORMAT[pArrayIndex].dwType = pType; } // -------------------------------------------------------------------------- // Method: Clear() // Description: The Clear() method can be used to clear the contents of the // TDIObjectDataFormat's internal DIOBJECTDATAFORMAT structure. // Note: if you have manually linked a structure member to a // chunk of memory, make sure you release this memory before // calling Clear(). // Params: pArrayIndex - // The ArrayIndex parameter determines which internal structure // needs to be cleared. Correct values range from 0 to // TDIObjectDataFormat::ArraySize-1. // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::Clear( dword pArrayIndex ) { // array is allocated? if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::Clear()", "TDX_ERROR", "Internal Array size is 0."); return; } // range check supplied index if (pArrayIndex>=fArraySize) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::Clear()", "TDX_ERROR", "Supplied index ["+IntToStr(pArrayIndex)+"] is out of bounds [0.."+IntToStr(fArraySize-1)+"]"); return; } ZeroMemory( &fDIOBJECTDATAFORMAT[pArrayIndex], sizeof(DIOBJECTDATAFORMAT) ); } // -------------------------------------------------------------------------- // Method: ClearAll() // Description: The ClearAll() method can be used to clear the contents of // all the internal DIOBJECTDATAFORMAT structures of the // TDIObjectDataFormat component. // Note: if you have manually linked a structure member to a // chunk of memory, make sure you release this memory before // calling Clear(). // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::ClearAll() { // array is allocated? if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError( this, "TDIObjectDataFormat::Clear()", "TDX_ERROR", "Internal Array size is 0."); return; } ZeroMemory( &fDIOBJECTDATAFORMAT[0], sizeof(DIOBJECTDATAFORMAT)*fArraySize ); } // -------------------------------------------------------------------------- // Internal Structure Access // -------------------------------------------------------------------------- DIOBJECTDATAFORMAT* __fastcall TDIObjectDataFormat::FGetInternal_DIOBJECTDATAFORMAT_Ptr() { // check for errors if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDIObjectDataFormat::FGetInternal_DIOBJECTDATAFORMAT_Ptr()", "TDX_ERROR", "Internal Array size is 0." ); return NULL; } return fDIOBJECTDATAFORMAT; } // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::FSetInternal_DIOBJECTDATAFORMAT( dword pArrayIndex, DIOBJECTDATAFORMAT* pDIOBJECTDATAFORMAT ) { // check for errors if (fArraySize==0) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDIObjectDataFormat::FSetInternal_DIOBJECTDATAFORMAT()", "TDX_ERROR", "Internal Array size is 0." ); return; } if (pDIOBJECTDATAFORMAT==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDIObjectDataFormat::FSetInternal_DIOBJECTDATAFORMAT()", "TDX_ERROR", "The supplied DIOBJECTDATAFORMAT* was NULL" ); return; } CopyMemory( &fDIOBJECTDATAFORMAT[pArrayIndex], pDIOBJECTDATAFORMAT, sizeof(DIOBJECTDATAFORMAT) ); Internal_DIOBJECTDATAFORMAT_Update(); } // -------------------------------------------------------------------------- void __fastcall TDIObjectDataFormat::Internal_DIOBJECTDATAFORMAT_Update() { } // -------------------------------------------------------------------------- // Method: FGetFlags_ // Description: This method returns a TDIObjectDataFormat_Flags_Set<> of the // flags in the current // fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags. // Note: Multi-Wrapper components do not yet have the capability to // allow modification of flags via the BCB Object Inspector. // -------------------------------------------------------------------------- TDIObjectDataFormat_Flags_Set __fastcall TDIObjectDataFormat::FGetFlags_( dword pArrayIndex ) { TDIObjectDataFormat_Flags_Set TempFlags_; TempFlags_.Clear(); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags & DIDOI_ASPECTACCEL) TempFlags_ = TempFlags_ << didoi_aspectaccel_; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags & DIDOI_ASPECTFORCE) TempFlags_ = TempFlags_ << didoi_aspectforce_; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags & DIDOI_ASPECTPOSITION) TempFlags_ = TempFlags_ << didoi_aspectposition_; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags & DIDOI_ASPECTVELOCITY) TempFlags_ = TempFlags_ << didoi_aspectvelocity; return TempFlags_; } // -------------------------------------------------------------------------- // Method: FGetFlags_Strings() // This method creates and then returns a TStringList containing // the current set of 'Flags' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDIObjectDataFormat::FGetFlags_Strings( dword pArrayIndex ) { // if the strings have not been allocated if (fFlags_Strings==NULL) { // attempt to allocate the strings fFlags_Strings = new TStringList(); // if the allocation failed if (fFlags_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDIObjectDataFormat::FGetFlags_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various Flags_Strings" ); return NULL; } } fFlags_Strings->Clear(); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags & DIDOI_ASPECTACCEL) fFlags_Strings->Add("DIDOI_ASPECTACCEL"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags & DIDOI_ASPECTFORCE) fFlags_Strings->Add("DIDOI_ASPECTFORCE"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags & DIDOI_ASPECTPOSITION) fFlags_Strings->Add("DIDOI_ASPECTPOSITION"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwFlags & DIDOI_ASPECTVELOCITY) fFlags_Strings->Add("DIDOI_ASPECTVELOCITY"); return fFlags_Strings; } // -------------------------------------------------------------------------- // Method: FGetType_ // Description: This method returns a TDIObjectDataFormat_Type_Set<> of the // flags in the current fDIOBJECTDATAFORMAT[pArrayIndex].dwType. // Note: Multi-Wrapper components do not yet have the capability to // allow modification of flags via the BCB Object Inspector. // -------------------------------------------------------------------------- TDIObjectDataFormat_Type_Set __fastcall TDIObjectDataFormat::FGetType_( dword pArrayIndex ) { TDIObjectDataFormat_Type_Set TempType_; TempType_.Clear(); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_ABSAXIS) TempType_ = TempType_ << didft_absaxis; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_AXIS) TempType_ = TempType_ << didft_axis; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_BUTTON) TempType_ = TempType_ << didft_button; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_FFACTUATOR) TempType_ = TempType_ << didft_ffactuator; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_FFEFFECTTRIGGER) TempType_ = TempType_ << didft_ffeffecttrigger; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_POV) TempType_ = TempType_ << didft_pov; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_PSHBUTTON) TempType_ = TempType_ << didft_pshbutton; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_RELAXIS) TempType_ = TempType_ << didft_relaxis; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_TGLBUTTON) TempType_ = TempType_ << didft_tglbutton; if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_VENDORDEFINED) TempType_ = TempType_ << didft_vendordefined; return TempType_; } // -------------------------------------------------------------------------- // Method: FGetType_Strings() // This method creates and then returns a TStringList containing // the current set of 'Type' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDIObjectDataFormat::FGetType_Strings( dword pArrayIndex ) { // if the strings have not been allocated if (fType_Strings==NULL) { // attempt to allocate the strings fType_Strings = new TStringList(); // if the allocation failed if (fType_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDIObjectDataFormat::FGetType_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various Type_Strings" ); return NULL; } } fType_Strings->Clear(); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_ABSAXIS) fType_Strings->Add("DIDFT_ABSAXIS"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_AXIS) fType_Strings->Add("DIDFT_AXIS"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_BUTTON) fType_Strings->Add("DIDFT_BUTTON"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_FFACTUATOR) fType_Strings->Add("DIDFT_FFACTUATOR"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_FFEFFECTTRIGGER) fType_Strings->Add("DIDFT_FFEFFECTTRIGGER"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_POV) fType_Strings->Add("DIDFT_POV"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_PSHBUTTON) fType_Strings->Add("DIDFT_PSHBUTTON"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_RELAXIS) fType_Strings->Add("DIDFT_RELAXIS"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_TGLBUTTON) fType_Strings->Add("DIDFT_TGLBUTTON"); if (fDIOBJECTDATAFORMAT[pArrayIndex].dwType & DIDFT_VENDORDEFINED) fType_Strings->Add("DIDFT_VENDORDEFINED"); return fType_Strings; } // --------------------------------------------------------------------------