MCIWndRealize macro (vfw.h)

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.


void MCIWndRealize(



Handle of the MCIWnd window.


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 value



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.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header vfw.h