This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <Windows.h> | |
static void PrintDisplayDeviceStateFlags(DWORD flags) | |
{ | |
if (flags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) | |
printf(" ATTACHED_TO_DESKTOP\n"); | |
if (flags & DISPLAY_DEVICE_MULTI_DRIVER) | |
printf(" MULTI_DRIVER\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma comment(lib, "windowsapp") | |
#include <cstdio> | |
#include "winrt/base.h" | |
#include "winrt/Windows.Devices.Enumeration.h" | |
#include "winrt/Windows.Devices.Display.h" | |
using namespace std; | |
using namespace winrt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace impl | |
{ | |
template <typename T> | |
using array_iterator = T*; | |
template <typename T> | |
auto make_array_iterator(T* data, uint32_t size, uint32_t index = 0) noexcept | |
{ | |
return data + index; |