Bink SDK 1.5v

BinkBufferCheckWinPos

The function BinkBufferCheckWinPos adjusts the specified window position coordinates for validity with the current BinkBuffer type.

void BinkBufferCheckWinPos(
  HBINKBUFFER bink_buf,
  S32 *new_window_x,
  S32 *new_window_y
);

In Parameters

bink_buf
Specifies the BinkBuffer handle.

Out Parameters

new_window_x
Specifies the X (left) coordinate that you want to check.
new_window_y
Specifies the Y (top) coordinate that you want to check.

Discussion

This function will adjust the supplied window position coordinates for validity with the current BinkBuffer blitting style. Because different blitting styles have different constraints (the primary surface blitting style can't be positioned partially off-screen, some overlay hardware doesn't allow partially off-screen surfaces, etc), this function will let the playback window be dragged safely. Normally under Win32, you should call this function in your WM_WINDOWPOSCHANGING message handler to prevent the window from ever moving to an invalid location. The NewWindowX and NewWindowY coordinates are global screen coordinates, so your default processing logic for WM_WINDOWPOSCHANGING should look something like this:

case WM_WINDOWPOSCHANGING:  if ( ( ( ( WINDOWPOS* ) lparam )->flags & SWP_NOMOVE ) == 0 )  {    if ( bink_buf )    {      S32 x,y;
x = ( ( WINDOWPOS* ) lparam )->x; y = ( ( WINDOWPOS* ) lparam )->y; BinkBufferCheckWinPos( bink_buf, &x, &y ); ( ( WINDOWPOS* )lparam )->x = x; ( ( WINDOWPOS* )lparam )->y = y; } } break;


Group: BinkBuffer API
Related Functions: BinkBufferSetOffset
Related Basic Types: HBINKBUFFER, S32, void

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