Bink SDK 1.5v

BinkBufferSetOffset

The function BinkBufferSetOffset tells the BinkBuffer that either the window position on the desktop or that the playback offset within the window has changed.

S32 BinkBufferSetOffset(
  HBINKBUFFER bink_buf,
  S32 dest_x,
  S32 dest_y
);

In Parameters

bink_buf
Specifies the BinkBuffer handle.
dest_x
Specifies the X (left) coordinate (relative to the upper-left of the window) that you want to blit to.
dest_y
Specifies the Y (top) coordinate (relative to the upper-left of the window) that you want to blit to.

Returns

Returns whether the BinkBuffer was successfully repositioned (non-zero) or whether the specified coordinates were invalid (zero).

Discussion

This function tells the BinkBuffer that either the playback window position itself or the playback offset within the window has been changed. Normally under Win32, you will want to call this function from the WM_WINDOWPOSCHANGED message in your window procedure. The dest_x and dest_y are offsets in client coordinates, so if you want the video to play in the upper left of your window, you should use zero for both offsets. So, the default code for your WM_WINDOWPOSCHANGED message would be:

case WM_WINDOWPOSCHANGED:  if ( bink_buf )    BinkBufferSetOffset( bink_buf, 0, 0 );  break;

DirectDraw overlays won't move if you drag the video playback window to a new position and you fail to call this function. This function will return a non-zero if the BinkBuffer was repositioned, or zero if the BinkBuffer couldn't be positioned to the given coordinates.


Group: BinkBuffer API
Related Functions: BinkBufferCheckWinPos
Related Basic Types: HBINKBUFFER, S32

For technical support, e-mail Bink1@radgametools.com
© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.