Skip to content

Latest commit

 

History

History
 
 

Direct3D

<!--TO READ THIS HELP FILE, RIGHT-CLICK ON THE FILE NAME IN THE
    SOLUTION EXPLORER PANE AND SELECT "VIEW IN BROWSER"-->

<html><head><title>DIRECT3D Attributes Sample: Demonstrates Using Direct3D</title></head><body><h1>DIRECT3D Attributes Sample: Demonstrates Using Direct3D</h1><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"></div><p /><p>The DIRECT3D attributes sample creates a control that draws a spinning triangle using the Direct3D graphics library.</p><p>The <MSHelp:link keywords="272A2AE8-9A66-489F-8D3A-DDE306697582" tabindex="0" >DIRECT3D 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>Note: You must have the Direct3D SDK installed in order to build this sample.</p></li><li><p>Open the solution file Direct3D.sln.</p></li><li><p>From the <b>Build</b> menu, click <b>Build Solution</b>.</p></li><li><p>After the sample builds, open Direct3D.htm in your Web browser.</p></li></ol></div><p>You can test the control in the ActiveX Control Test Container. For details on accessing Test Container and using it to test a control, see <MSHelp:link keywords="626867CF-FE53-4C30-8973-55BB93EF3917" tabindex="0" >Testing Properties and Events with Test Container</MSHelp:link>.</p></div><h1 class="heading">Attributes</h1><div id="sectionSection1" class="seeAlsoNoToggleSection"><p>This sample uses the following attributes:</p><p>coclass, default, dll, dual, helpstring, implements_category, module, name, object, pointer_default, progid, registration_script, support_error_info, uuid, vi_progid</p></div><h1 class="heading">Keywords</h1><div id="sectionSection2" class="seeAlsoNoToggleSection"><p>This sample uses the following keywords:</p><p>Apartment; ATLASSERT; ATLTRACE; AtlWaitWithMessageLoop; BEGIN_COM_MAP; BEGIN_MSG_MAP; BEGIN_OBJECT_MAP; BEGIN_PROPERTY_MAP; CComCoClass; CComControl; CComControlBase::InPlaceActivate; CComModule::GetClassObject; CComModule::GetLockCount; CComModule::Init; CComModule::RegisterServer; CComModule::Term; CComModule::UnregisterServer; CComObjectRoot; CException::ReportError; CoGetInterfaceAndReleaseStream; CoInitialize; COM_INTERFACE_ENTRY; COM_INTERFACE_ENTRY_IMPL; COM_INTERFACE_ENTRY_IMPL_IID; CoMarshalInterThreadInterfaceInStream; CopyMemory; CoUninitialize; CreatePalette; CreateRectRgn; CreateThread; D3DEXECUTEBUFFERDESC; DDSURFACEDESC; DDSURFACEDESC; DECLARE_GET_CONTROLLING_UNKNOWN; DECLARE_REGISTRY_RESOURCEID; DirectDrawCreate; DirectDrawCreateClipper; DisableThreadLibraryCalls; END_OBJECT_MAP; GetClientRect; GetOurWindow; GetSystemPaletteEntries; IDataObjectImpl; IDirect3D::CreateLight; IDirect3D::CreateMaterial; IDirect3D::CreateViewport; IDirect3DDevice::AddViewport; IDirect3DDevice::BeginScene; IDirect3DDevice::CreateMatrix; IDirect3DDevice::DeleteMatrix; IDirect3DDevice::EndScene; IDirect3DDevice::Execute; IDirect3DViewport::AddLight; IDirect3DViewport::CreateMatrix; IDirect3DViewport::SetBackground; IDirect3DViewport::SetMatrix; IDirectDraw2::EnumDevices; IDirectDraw2::SetCooperativeLevel; IDirectDrawClipper::SetHWnd; IDirectDrawSurface2::AddAttachedSurface; IDirectDrawSurface2::GetSurfaceDesc; IDirectDrawSurface2::Restore; IDirectDrawSurface2::SetClipper; IDispatchImpl; IObjectSafetyImpl; IOleControlImpl; IOleInPlaceActiveObjectImpl; IOleInPlaceObjectWindowlessImpl; IOleInPlaceObjectWindowlessImpl::InPlaceDeactivate; IOleInPlaceObjectWindowlessImpl::SetObjectRects; IOleObjectImpl; IPersistStorageImpl; IPersistStreamInitImpl; IProvideClassInfo2Impl; IQuickActivateImpl; ISupportErrorInfo; IViewObjectExImpl; LPD3DDEVICEDESC; LPD3DINSTRUCTION; LPD3DPROCESSVERTICES; LPD3DSTATE; LPD3DTRIANGLE; LPD3DVERTEX; LPDIRECTDRAWCLIPPER ; MessageBox; OBJECT_ENTRY; OffsetRect; OnEraseBackground; PALETTEENTRY; QueryInterface; RenderScene; SelectClipRgn; SetPalette; WindowFromDC; 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 :DIRECT3D Attributes Sample: Demonstrates Using Direct3D">comments</a> about this topic to Microsoft.
      </div></div></body></html>