MCIWndRealize

The MCIWndRealize macro controls how an MCI window realized in the foreground or background. This macro also causes the palette for the MCI window to be realized in the process. You can use this macro or explicitly send the MCIWNDM_REALIZE message.

LONG MCIWndRealize(
  hwnd,  
  fBkgnd 
);
 

Parameters

hwnd
Handle of the MCIWnd window.
fBkgnd
Background flag. Specify TRUE for this parameter for the window to be realized in the background or FALSE if the window can be realized in the foreground.

Return Values

Returns zero if successful or an error otherwise.

Remarks

A common use for MCIWndRealize is to coordinate palette ownership between an MCI control and the application that contains it. The application can have the MCI window realize in the background and realize its own palette in the foreground.

If your application contains an MCI control, but does not need to realize its palette, you can use this macro to handle the WM_PALETTECHANGED and WM_QUERYNEWPALETTE messages, instead of using RealizePalette. However, it is usually easier to call the SendMessage function to forward the message to the MCIWnd window, which will automatically realize the palette.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in vfw.h.

See Also

MCIWnd Window Class Overview, MCIWnd Macros, MCIWNDM_REALIZE, RealizePalette, SendMessage, WM_PALETTECHANGED, WM_QUERYNEWPALETTE