Vpedal API

Using FootPedal in your program

FootPedal is a device that can be used for control of playback and it is easily configured.  It is also easy to program as you do not need to have any knowledge about physical device interface.

I am providing some codes based on Microsoft Visual C++ 6.0.

1.  These codes include “mmsystem.h” to support MultiMedia in your project.

2.You can overwrite WindowProc() function in the window where you want to use FootPedal. (WindowProc function can process all messages that occur in the program)

3.  The FootPedal has two buttons, one for Forward playback and the other for Backward playback.  If you Press the two buttons simultaneously, it will start the playback.

The Program is as follows:

WindowProc(UINT message, WPARAM wParam, LPARAM lParam)

{

switch(message)

{

case MM_JOY1BUTTONDOWN: //one of the key is press

if ( (wParam & JOY_BUTTON1) && (wParam & JOY_BUTTON2) )

              {

                     //to perform the playback function

}

              else if ( (UINT) wParam & JOY_BUTTON1 )

       {

                     //to perform the Backward function

}

  else if ( (UINT) wParam & JOY_BUTTON2 )

        {

                     //to perform the Forward function

      }

break;

case WM_DESTROY:

// before closing the program window, Release capture on the joystick                                                        joyReleaseCapture( JOYSTICKID1 );

            break;

}

}

Good Luck!

 

 

 

 

 

 

 

 

 

Vpedal.com