• Advertisement

Archived

This topic is now archived and is closed to further replies.

set DIPROP_AXISMODE

This topic is 5717 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i was looking in the dx8.1 help trying to figure out how to change the mouse to absolute mode... however, the documentation seems retarded. i cant seem to get it to work right. the sdk says use SetProperty with DIPROP_AXISMODE, and DIPROPHEADER, however, it also says i need to send it a DIPROPDWORD structure -yet SetProperty only takes 2 params!! how does this work?

Share this post


Link to post
Share on other sites
Advertisement
The SetProperty function takes a GUID identifying the property to be set, and the address of a DIPROPHEADER. The idea is that you use the appropriate property structure (specified for each property in the docs), but pass the address of the header in the structure. In your case, you use a DIPROPDWORD, and call the SetProperty function like this:

DIPROPDWORD param = {{sizeof(DIPROPHEADER), // Nested header structure
sizeof(DIPROPDWORD),
0, DIPH_DEVICE},
DIPROPAXISMODE_ABS}; // Actual parameter value
lpdi8->SetProperty(DIPROP_AXISMODE, &m.diph);


[edited by - Krunk on May 30, 2002 6:14:05 PM]

Share this post


Link to post
Share on other sites
i got it to work, u got to set it befpore u aquire it


  
DIPROPDWORD dipdw;
dipdw.diph.dwSize = sizeof(DIPROPDWORD);
dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
dipdw.diph.dwObj = 0;
dipdw.diph.dwHow = DIPH_DEVICE;
dipdw.dwData = DIPROPAXISMODE_ABS ;

HRESULT hr = _pDIMouseDevice->SetProperty(DIPROP_AXISMODE , &dipdw.diph);


thanks alot

Share this post


Link to post
Share on other sites

  • Advertisement