home *** CD-ROM | disk | FTP | other *** search
- /*
- apwapi.c -- utility routines for apw callbacks
- */
-
- #include <windows.h>
- #include "apwpost.h"
-
-
- BOOL FAR PASCAL APWSetPalette( HWND hWnd, HPALETTE hPal, DWORD flags )
- /*
- Tells Authorware to use the specified palette.
-
- Parameters:
- hWnd Window handle of Authorware presentation window
- hPal Logical palette to use.
- flags SP_DEFAULT, SP_NOSTATIC, SP_RAW.
-
- ( bNoStatic TRUE to override static colors, regardless of
- ( Preserve System Colors setting in file.
- ( FALSE to use file's Preserve System colors setting.
-
- Returns:
- TRUE If the operation succeeded.
- FALSE If it failed.
-
- Notes:
- hPal is no longer valid after this call, whether or not
- the operation succeeded.
- */
- {
- BOOL result;
-
- result = (BOOL)SendMessage(hWnd, APWC_SETPAL, hPal, flags);
-
- // APW doesn't delete the palette if the operation failed, so do it here.
- if (!result)
- DeleteObject(hPal);
-
- return result;
- }
-
-
- HPALETTE FAR PASCAL APWGetPalette( HWND hWnd )
- /*
- Gets a handle to Authorware's current palette. This is the
- actual palette in use, not a copy. Do not delete it.
-
- Parameters:
- hWnd Window handle of Authorware presentation window
-
- Returns:
- Handle to Authorware's current palette or NULL if there is
- no current palette.
- */
- {
- return (HPALETTE)SendMessage(hWnd, APWC_GETPAL, 0, 0);
- }
-
-
- VOID FAR PASCAL APWResetPalette( HWND hWnd )
- /*
- Resets the palette and static color usage settings to that
- defined in the file's File Setup.
-
- Parameters:
- hWnd Window handle of Authorware presentation window
- */
- {
- SendMessage(hWnd, APWC_RESETPAL, 0, 0);
- }
-