GM_setAppActivate

Sets the application activate callback function

Declaration

void MGLAPI GM_setAppActivate(
    GM_activateFunc func)
typedef void (*GM_activateFunc)(
    ibool active)

Prototype In

gm/gm.h

Parameters

func

Application activate callback function to register

 

Description

This function sets the application activate callback function for your Game Framework game. This function is called in windowed modes whenever the activation status of your game changes, which can occur if the window is minimised to the task bar or if the user switches away to another application using Alt-Tab. Your callback is passed a flag that indicates whether your game is now currently active or not, and should be used to enable and disable support for things such as CD-Audio when your application loses activation (or the current focus).

Note:    The Game Framework contains built in support for enabling and disabling the static system palette colors when running in windowed modes, and will automatically switch back to static system color mode when your window loses the activation focus. Hence you should not attempt to change this in your application activate callback (if you want to be able to use the static system colors in a window, call GM_initSysPalNoStatic(true) before you initialize the Game Framework.

Note:    This function is only called in windowed modes, and the equivalent function for fullscreen modes is set with the GM_setSuspendAppCallback function.

See Also

GM_init, GM_setSuspendAppCallback, GM_initSysPalNoStatic

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com