In the final section of this chapter, we are going to initialize and configure our device. As the window has been created and the time has been added to our framework, the next step is to obtain a reference to the device. Open the Initialize the device
project from the source code.
Let's check the new headers and classes of this project step-by-step. First, open DXHelper.h
from the Framework
folder. The DXHelper.h
file is shown in the following code:
#pragma once #include "pch.h" using namespace Platform; namespace DXHelper { inline void OutputDebug(Platform::String^ Msg) { auto data = std::wstring(Msg->Data()); OutputDebugString(data.c_str()); } inline void ThrowIfFailed(HRESULT hr) { if (FAILED(hr)) throw Exception::CreateException(hr); ...
No credit card required