Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Creating an MCIWnd Window

The MCIWndCreate function registers and creates an MCIWnd window. The window can be a parent, child, or pop-up window. The following example creates an MCIWnd window as a child window and lets the user control playback by providing access to the trackbar and the Play, Stop, and Menu buttons. The example specifies a handle of a parent window and specifies NULL for the window styles, so the default window styles of WS_CHILD, WS_BORDER, and WS_VISIBLE are used to create the MCIWnd window.

// Global variable and constants 
// extern HINSTANCE g_hinst;       instance handle 
// extern HWND g_hwndMCIWnd;       MCIWnd window handle 
    switch (wParam) { 
        g_hwndMCIWnd = MCIWndCreate(hwnd, g_hinst, NULL, 

Note  You could also specify NULL for both the parent window handle and the window styles, in which case the default window styles would be WS_OVERLAPPED and WS_VISIBLE.



Community Additions

© 2015 Microsoft