Repository navigation
CDInfo
Directory actions
More options
Directory actions
More options
CDInfo
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
<!--TO READ THIS HELP FILE, RIGHT-CLICK ON THE FILE NAME IN THE
SOLUTION EXPLORER PANE AND SELECT "VIEW IN BROWSER"-->
<html><head><title>CDINFO Attributes Sample: Plays and Displays Information About CD Audio Tracks</title></head><body><h1>CDINFO Attributes Sample: Plays and Displays Information About CD Audio Tracks</h1><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"></div><p /><p>The CDINFO attributes sample uses the Media Control Interface (MCI) APIs to retrieve the length of the audio tracks on the CD currently in your CD-ROM drive. CDINFO then draws a piechart to display track length. CDINFO also demonstrates how to use the ToolTip common control to implement a tool tip. This tool tip displays the audio track length corresponding to the cursor's location in the piechart.</p><p>The <MSHelp:link keywords="FD35FF45-1C75-4B0E-B428-A60464ED02B3" tabindex="0" >CDINFO sample</MSHelp:link> is the nonattributed version of this sample.</p><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Security Note </th></tr><tr><td><p>This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices.</p></td></tr></table></div><h1 class="heading">Building and Running the Sample</h1><div id="sectionSection0" class="seeAlsoNoToggleSection"><h4 class="subHeading">To build and run this sample</h4><div class="subSection"><ol><li><p>Open the solution file CDInfo.sln.</p></li><li><p>From the <b>Build</b> menu, click <b>Build</b>.</p></li><li><p>After the sample builds, open CDInfo.htm in your Web browser and follow its instructions.</p></li></ol></div></div><h1 class="heading">Properties and Methods</h1><div id="sectionSection1" class="seeAlsoNoToggleSection"><p>The control implements the following methods:</p><p><b>Read</b> Reads the track length information from the CD currently in the drive and displays the information in the form of a piechart.</p><p><b>Redraw</b> Redraws the piechart for the current CD.</p><p><b>Play</b> Starts playing the CD at the specified track number. The control also rotates the piechart so that the track playing is at the top.</p><p>The following properties are available:</p><p><b>Tracks</b> The number of tracks on the CD</p><p><b>Length</b> The length of the specified track number in seconds</p><p><b>TotalLength</b> The total length of the CD in seconds</p></div><h1 class="heading">Attributes</h1><div id="sectionSection2" class="seeAlsoNoToggleSection"><p>This sample uses the following attributes:</p><p>coclass, default, dispinterface, dual, emitidl, event_source, helpstring, id, implements_category, in, module, object, out, pointer_default, progid, propget, propput, registration_script, retval, threading, uuid, version, vi_progid</p></div><h1 class="heading">Keywords</h1><div id="sectionSection3" class="seeAlsoNoToggleSection"><p>This sample uses the following keywords:</p><p>BEGIN_COM_MAP; BEGIN_CONNECTION_POINT_MAP; BEGIN_MSG_MAP; BEGIN_OBJECT_MAP; BEGIN_PROPERTY_MAP; CComCoClass; CComControl; CComObjectRoot; COM_INTERFACE_ENTRY; COM_INTERFACE_ENTRY_IMPL; CONNECTION_POINT_ENTRY; CProxyCDEvents; CreateBrushIndirect; CreateRectRgn; DECLARE_REGISTRY_RESOURCEID; DeleteDC; DeleteObject; DrawCD; Ellipse; END_COM_MAP; END_CONNECTION_POINT_MAP; END_MSG_MAP; END_OBJECT_MAP; END_PROPERTY_MAP; IConnectionPointContainerImpl; IConnectionPointImpl; IDataObjectImpl; IDispatchImpl; IOleControlImpl; IOleInPlaceActiveObjectImpl; IOleInPlaceObjectWindowlessImpl; IOleLinkImpl; IOleObjectImpl; IPerPropertyBrowsingImpl; IPersistStorageImpl; IPersistStreamInitImpl; IPropertyNotifySinkCP; IProvideClassInfo2Impl; IQuickActivateImpl; IRunnableObjectImpl; IViewObjectExImpl; LineTo; mciSendCommand; MESSAGE_HANDLER; MoveToEx; OBJECT_ENTRY; ReduceRect; RelayEvent; SelectClipRgn; SelectObject; VariantInit; ZeroMemory</p><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note </th></tr><tr><td><p>Some of the samples, such as this one, have not been modified to reflect the changes in the Visual C++ wizards, libraries, and compiler, but still demonstrate how to complete your desired task. </p></td></tr></table></div></div></div><div id="footer"><div class="footerLine"></div>
© Microsoft Corporation. All rights reserved. Send <a href="mailto:DevDocs@microsoft.com?subject=Documentation Feedback :CDINFO Attributes Sample: Plays and Displays Information About CD Audio Tracks">comments</a> about this topic to Microsoft.
</div></div></body></html>