Click to open or copy the files for the Diff1 sample.
This sample applies raw forces to a force feedback joystick, illustrating how a simulator-type application can use force feedback to generate forces computed by a physics engine. This application plays a force on the joystick in response to mouse clicks.
The core of the program is the joySetForcesXY function, which accepts two-dimensional force data and sends it to the joystick.
This sample uses the following keywords:
acquire; appinit; beginpaint; complain; createdevice; createeffect; createwindow; defwindowproc; destroywindow; diinit; directinputcreate; dispatchmessage; diterm; ellipse; endpaint; enumdevices; enumffjoystickscallback; ex_coordtoforce; ex_onlbuttondown; ex_onlbuttonup; ex_onmousemove; ex_onpaint; ex_onsize; ex_syncacquire; ex_wndproc; failed; getmessage; getstockbrush; getstockpen; handle_msg; invalidaterect; joysetforcesxy; lineto; loadcursor; loadicon; makeintresource; messagebox; movetoex; muldiv; postquitmessage; queryinterface; registerclass; release; releasecapture; selectbrush; selectpen; setcapture; setcooperativelevel; setdataformat; setparameters; setproperty; showwindow; sqrt; start; translatemessage; unacquire; updatewindow; winmain