Home   Index   About
Ultimate Pack


Custom Search
Overview
Group
Quick Info

MCIWndCreate

The MCIWndCreate function registers the MCIWnd window class and creates an MCIWnd window for using MCI services. MCIWndCreate can also open an MCI device or file (such as an AVI file) and associate it with the MCIWnd window.

HWND MCIWndCreate(

HWND hwndParent,

HINSTANCE hInstance,

DWORD dwStyle,

LPSTR szFile

);

Parameters

hwndParent

Handle of the parent window.

hInstance

Handle of the module instance to associate with the MCIWnd window.

dwStyle

Flags defining the window style. In addition to specifying the window styles used with the CreateWindowEx function, you can specify the following styles to use with MCIWnd windows:

MCIWNDF_NOAUTOSIZEWINDOW

Will not change the dimensions of an MCIWnd window when the image size changes.

MCIWNDF_NOAUTOSIZEMOVIE

Will not change the dimensions of the destination rectangle when an MCIWnd window size changes.

MCIWNDF_NOERRORDLG

Inhibits display of MCI errors to users.

MCIWNDF_NOMENU

Hides the Menu button from view on the toolbar and prohibits users from accessing its pop-up menu.

MCIWNDF_NOOPEN

Hides the open and close commands from the MCIWnd menu and prohibits users from accessing these choices in the pop-up menu.

MCIWNDF_NOPLAYBAR

Hides the toolbar from view and prohibits users from accessing it.

MCIWNDF_NOTIFYANSI

Causes MCIWnd to use an ANSI string instead of a Unicode string when notifying the parent window of device mode changes. This flag is used in combination with MCIWNDF_NOTIFYMODE and is exclusive to Windows NT.

MCIWNDF_NOTIFYMODE

Causes MCIWnd to notify the parent window with an MCIWNDM_NOTIFYMODE message whenever the device changes operating modes. The lParam parameter of this message identifies the new mode, such as MCI_MODE_STOP.

MCIWNDF_NOTIFYPOS

Causes MCIWnd to notify the parent window with an MCIWNDM_NOTIFYPOS message whenever a change in the playback or record position within the content occurs. The lParam parameter of this message contains the new position in the content.

MCIWNDF_NOTIFYMEDIA

Causes MCIWnd to notify the parent window with an MCIWNDM_NOTIFYMEDIA message whenever a new device is used or a data file is opened or closed. The lParam parameter of this message contains a pointer to the new filename.

MCIWNDF_NOTIFYSIZE

Causes MCIWnd to notify the parent window when the MCIWnd window size changes.

MCIWNDF_NOTIFYERROR

Causes MCIWnd to notify the parent window when an MCI error occurs.

MCIWNDF_NOTIFYALL

Causes all MCIWNDF window notification styles to be used.

MCIWNDF_RECORD

Adds a Record button to the toolbar and adds a new file command to the menu if the MCI device has recording capability.

MCIWNDF_SHOWALL

Causes all MCIWNDF_SHOW styles to be used.

MCIWNDF_SHOWMODE

Displays the current mode of the MCI device in the window title bar. For a list of device modes, see the MCIWndGetMode macro.

MCIWNDF_SHOWNAME

Displays the name of the open MCI device or data file in the MCIWnd window title bar.

MCIWNDF_SHOWPOS

Displays the current position within the content of the MCI device in the window title bar.

szFile

Null-terminated string indicating the name of an MCI device or data file to open.

Return Values

Returns the handle to an MCI window if successful or zero otherwise.

Remarks

Default window styles for a child window are WS_CHILD, WS_BORDER, and WS_VISIBLE. MCIWndCreate assumes a child window when a non-NULL handle of a parent window is specified.

Default window styles for a parent window are WS_OVERLAPPEDWINDOW and WS_VISIBLE. MCIWndCreate assumes a parent window when a NULL handle of a parent window is specified.

Use the window handle returned by this function for the window handle in the MCIWnd macros. If your application uses this function, it does not need to use the MCIWndRegisterClass function.

See Also

CreateWindowEx
, MCIWNDM_NOTIFYMODE, MCIWNDM_NOTIFYPOS, MCIWNDM_NOTIFYMEDIA, MCIWndGetMode, MCIWndRegisterClass


Last news from Greatis Software

Nostalgia .Net     Nostalgia .Net     .Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes.  More »

Recommended software for developers

Ultimate Pack for Delphi and C++ Builder     Ultimate Pack     Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price.  More »

Form Designer .Net     Form Designer .Net     Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro!  More »

Print Suite .Net     Print Suite .Net     Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available  More »

Gradient Controls .Net     Gradient Controls .Net     Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available  More »

iGrid     Greatis iGrid     iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors.  More »


All the contacts and projects

Dmitry Vasiliev (just.dmitry)

Related Links

Software for Visual Studio .NET developers
Software for Delphi and C++ Builder developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference
Win32 Multimedia Programmer's Reference
OLE Programmer's Reference
Microsoft Windows Pen API Programmer's Reference
Microsoft Windows Sockets 2 Reference
Microsoft Windows Telephony API (TAPI) Programmer's Reference
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008-2011 Free Tech Secrets ;) greatis just4fun network just4fun