2 Replies - 327 Views - Last Post: 22 September 2019 - 11:26 AM Rate Topic: -----

#1 Dave89   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 24
  • Joined: 25-July 19

DirectX 11 Enumeration Problem

Posted 20 September 2019 - 03:46 PM

Hi there,

I'm currently working on a dialog box that allows the user to select which graphics adapter they want to use and the display mode for that adapter (going to use it for future projects), but I've hit a problem when I select the anything other than the primary graphics card, no outputs are found for that adapter (In my case my nVidia GTX 960m), now this problem can be solved by going into the nvidia graphics settings and setting the program to use the nVidia card but then if I select the Intel (primary) card it can't find outputs for that one, I have been trying to find solutions through google but does not look like there are any other than what i have already tried.

What my program does up to now is enumerate the adapters and when the user changes the adapter it tried to enumerate the display mode list for that adapter which needs an IDXGIOutput which can't be found on adapters that are not set to primary. My Code for enumeration is as follows:

// File: DirectXEnum.cpp

// Includes
#include "PCH.h"
#include "DirectXEnum.h"

wstring DirectXEnum::GetAdapterName(UINT adapterIndex)
{
	wstring adapterName{};
	DXGI_ADAPTER_DESC3 desc{};

	m_vAdapter.at(adapterIndex)->GetDesc3(&desc);

	adapterName = desc.Description;
	return adapterName;
}

void DirectXEnum::EnumAdapters()
{
	HRESULT result{ S_OK };

	// Create Base Objects then query later for higher function
	com_ptr<IDXGIFactory> factory{ nullptr };
	com_ptr<IDXGIAdapter> adapter{ nullptr };
	com_ptr<IDXGIOutput> adapterOutput{ nullptr };

	result = CreateDXGIFactory(__uuidof(IDXGIFactory), factory.put_void());

	if (FAILED(result))
	{
		MessageBox(nullptr, L"CreateDXGIFactory() Failed!", L"DirectXEnum Error", MB_IConerror);
		return;
	}

	m_factory = factory.as<IDXGIFactory7>();

	// Enumerator the availble adapters
	for (UINT i = 0; m_factory->EnumAdapterByGpuPreference(i, DXGI_GPU_PREFERENCE_UNSPECIFIED/*DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE*/, __uuidof(IDXGIAdapter4), adapter.put_void()) != DXGI_ERROR_NOT_FOUND; ++i)
	{
		//vAdapters.push_back(pAdapter);
		com_ptr<IDXGIAdapter4> tmp{};
		tmp = adapter.as<IDXGIAdapter4>();
		m_vAdapter.push_back(tmp);
		adapter = nullptr;
	}
}

void DirectXEnum::EnumModes(UINT adapterIndex)
{
	HRESULT result{ S_OK };

	com_ptr<IDXGIOutput> output{};

	// Enumerate the primary adapter output (monitor)
	if (FAILED(result = m_vAdapter.at(adapterIndex)->EnumOutputs(0, output.put())))
	{
		MessageBox(nullptr, L"EnumOutputs() Failed.", L"DirectXEnum Error", MB_IConerror);
		return;
	}

	m_AdapterOutput = nullptr;
	m_AdapterOutput = output.as<IDXGIOutput6>();
	UINT nModes{ 0 };
	
	// Get the number of display modes
	if (FAILED(result = m_AdapterOutput->GetDisplayModeList(DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_ENUM_MODES_INTERLACED, &nModes, nullptr)))
	{
		MessageBox(nullptr, L"GetDisplayModeList() Failed to obtain number of modes!", L"DirectXEnum Error", MB_IConerror);
		return;
	}
	
	m_displayModeList.resize(nModes);

	if (FAILED(result = m_AdapterOutput->GetDisplayModeList1(DXGI_FORMAT_R8G8B8A8_UNORM, 0, &nModes, &m_displayModeList[0])))
	{
		MessageBox(nullptr, L"GetDisplayModeList() Failed to obtain display modes!", L"DirectXEnum Error", MB_IConerror);
		return;
	}
}

wstring DirectXEnum::GetDisplayModeAsString(UINT adapterIndex, UINT DisplayModeIndex)
{
	wstring output{};
	wstringstream outputStream{};

	EnumModes(adapterIndex);

	outputStream << m_displayModeList.at(DisplayModeIndex).Width << " x " << m_displayModeList.at(DisplayModeIndex).Height;
	output = outputStream.str();

	return output;
}


I'm trying to figure out a way around this problem but having great difficulty doing so? has anyone had this problem and found a solution where you can pragmatically set the primary adapter based on the user selection or some other way (I've seen samples of code user extern 'C' to specify nvidia graphics or amd to use the highest performance but can't use that to allow the change at runtime based on user choices).

code for the extern 'c' look like follows:
extern "C" {
  // http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
  __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
​
  // http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
  __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}


and using the EnumAdapterByGpuPreference makes no difference weather you set it to high performance or not like some posts online suggested it might. any ideas to a way around this problem?

Kind Regards
Dave

Is This A Good Question/Topic? 0
  • +

Replies To: DirectX 11 Enumeration Problem

#2 Dave89   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 24
  • Joined: 25-July 19

Re: DirectX 11 Enumeration Problem

Posted 21 September 2019 - 05:01 AM

I've tried a different approach but not go any results yet, I have tried creating the ID3D11Device and Context with the selected adapter, on success create a swapchain and from there call the IDXGISwapchain::GetContainingOutput() method but this still returns null though creation was successful for the swapchain but I get the debug message:

Quote

XGI ERROR: IDXGISwapChain::GetContainingOutput: The swapchain's adapter does not control the output on which the swapchain's window resides. [ MISCELLANEOUS ERROR #80: ]


I'll see if i can find a way that I may be able to either swap control during execution, silly thing is that i'm not wanting control of the output I just want to get the display mode list from it :(.

Regards
Dave
Was This Post Helpful? 0
  • +
  • -

#3 Dave89   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 24
  • Joined: 25-July 19

Re: DirectX 11 Enumeration Problem

Posted 22 September 2019 - 11:26 AM

From looking into this problem further it seems as though unless specified otherwise through windows settings or graphics card settings that the integrated graphics card is used for displaying to an output (monitor), I'm not sure how this all works on a AMD desktop that doesn't use integrated graphics but I'll try figure that out in the future unless someone using such a system wants to test a let me know what happens with regards to enumerating output for different graphics cards.

What I have done with the code for the time being is use the Output from the primary adapter for the display modes but still allow the user to use the adapter of their choice for the rendering operations (As I'm only using one monitor and that is what my renderings will be presented too.)

I've not tested this code fully yet and believe that I may run into problems using a different adapters when trying to do a full screen transition from windowed mode after the dialog (but I can't say that for certain) one solution is just not to allow the user to switch after they have chosen the settings at the start but I'll try remember to keep this post upgraded with any improvements to it.

Below is the new code:
// DirectXEnum.h
#ifndef _DIRECTXENUM_H_
#define _DIRECTXENUM_H_

// Class Name: DirectXEnum
namespace DirectXEnum
{
	struct DialogChoices
	{
		com_ptr<IDXGIAdapter4> adapter{};
		DXGI_MODE_DESC1 mode{};
		bool bFullscreen{};
	};

	wstring GetAdapterName(UINT adapterIndex);
	wstring GetAdapterName(com_ptr<IDXGIAdapter4> adapter);
	wstring GetOutputName(UINT outputIndex);
	UINT	NumberOfAdapters();
	UINT	NumberOfOutputs();

	void EnumAdapters();
	void EnumOutputs(UINT adapterIndex = 0);
	void EnumModes(UINT outputIndex = 0);

	UINT NumberOfModes();
	wstring GetDisplayModeAsString(UINT outputIndex, UINT DMIndex);

	void AddAdaptersToComboBox(HWND hWnd);
	void AddOutputsToComboBox(HWND hWnd, UINT adapterIndex = 0);
	void AddModesToComboBox(HWND hWnd, UINT outputIndex = 0);
	void GetAdapterInfo(UINT adapterIndex = 0);
	void GetOutputInfo(UINT outputIndex = 0);
	UINT FindCLosestModeMatch(UINT outputIndex = 0);

	BOOL DisplayDialog();

	DialogChoices& GetFinalSelection();
};

#endif


// File: DirectXEnum.cpp

// Includes
#include "PCH.h"
#include "DirectXEnum.h"
#include "resource.h"

namespace DirectXEnum
{
	com_ptr<IDXGIFactory7> m_factory{};

	vector<com_ptr<IDXGIAdapter4>> m_vAdapters{};
	vector<com_ptr<IDXGIOutput6>> m_vAdapterOutputs{};
	vector<DXGI_MODE_DESC1> m_displayModeList{};
	DialogChoices FinalChoice{};

	wstring GetAdapterName(UINT adapterIndex)
	{
		wstring adapterName{};
		DXGI_ADAPTER_DESC3 desc{};

		m_vAdapters.at(adapterIndex)->GetDesc3(&desc);

		adapterName = desc.Description;

		return adapterName;
	}

	wstring GetAdapterName(com_ptr<IDXGIAdapter4> adapter)
	{
		wstring adapterName{};
		DXGI_ADAPTER_DESC3 desc{};

		adapter->GetDesc3(&desc);

		adapterName = desc.Description;

		return adapterName;
	}

	wstring GetOutputName(UINT outputIndex)
	{
		wstring outputName{};
		DXGI_OUTPUT_DESC1 desc{};

		m_vAdapterOutputs.at(outputIndex)->GetDesc1(&desc);

		outputName = desc.DeviceName;

		return outputName;
	}

	UINT NumberOfAdapters()
	{
		return m_vAdapters.size();
	}

	UINT NumberOfOutputs()
	{
		return m_vAdapterOutputs.size();
	}

	void EnumAdapters()
	{
		HRESULT result{ S_OK };

		// Create Base Objects then query later for higher function
		com_ptr<IDXGIFactory> factory{ nullptr };
		com_ptr<IDXGIAdapter> adapter{ nullptr };
		com_ptr<IDXGIOutput> adapterOutput{ nullptr };

		result = CreateDXGIFactory(__uuidof(IDXGIFactory), factory.put_void());

		if (FAILED(result))
		{
			MessageBox(nullptr, L"CreateDXGIFactory() Failed!", L"DirectXEnum Error", MB_IConerror);
			return;
		}

		m_factory = factory.as<IDXGIFactory7>();

		// Enumerator the availble adapters
		for (UINT i = 0; m_factory->EnumAdapterByGpuPreference(i, DXGI_GPU_PREFERENCE_UNSPECIFIED, __uuidof(IDXGIAdapter4), adapter.put_void()) != DXGI_ERROR_NOT_FOUND; ++i)
		{
			com_ptr<IDXGIAdapter4> tmp{};
			tmp = adapter.as<IDXGIAdapter4>();
			m_vAdapters.push_back(tmp);
			adapter = nullptr;
		}
	}

	void EnumOutputs(UINT adapterIndex)
	{
		// Clear any data already stored
		m_vAdapterOutputs.clear();

		com_ptr<IDXGIOutput> output{};
		for (UINT i = 0; m_vAdapters.at(adapterIndex)->EnumOutputs(i, output.put()) != DXGI_ERROR_NOT_FOUND; ++i)
		{
			com_ptr<IDXGIOutput6> outputUpgrade{};
			outputUpgrade = output.as<IDXGIOutput6>();
			m_vAdapterOutputs.push_back(outputUpgrade);
			output = nullptr;
		}

		if (m_vAdapterOutputs.size() < 1)
		{
			OutputDebugString(L"\nEnumOutputs() Failed :- Reason: no outputs where found for the current adapter!\n");
			return;
		}

		return;
	}

	void EnumModes(UINT outputIndex)
	{
		HRESULT result{ S_OK };

		// It seems like since Windows 10 that we only have the integrated or primary graphics adapter available with Output devices
		// but qwe can still use a secondary adapter for the ID3D11Device, Since the IDXGIOutput is only a representation of the screen
		// to which we draw we can just find the output that is available from the adapters (not nessecarily the selected one) and enum
		// the display mode list of supported modes for that monitor or output display device.
		m_displayModeList.clear();
		UINT nModes{ 0 };

		// Get the number of display modes
		if (FAILED(result = m_vAdapterOutputs.at(outputIndex)->GetDisplayModeList(DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_ENUM_MODES_INTERLACED, &nModes, nullptr)))
		{
			MessageBox(nullptr, L"GetDisplayModeList() Failed to obtain number of modes!", L"DirectXEnum Error", MB_IConerror);
			return;
		}

		m_displayModeList.resize(nModes);

		if (FAILED(result = m_vAdapterOutputs.at(outputIndex)->GetDisplayModeList1(DXGI_FORMAT_R8G8B8A8_UNORM, 0, &nModes, &m_displayModeList[0])))
		{
			MessageBox(nullptr, L"GetDisplayModeList() Failed to obtain display modes!", L"DirectXEnum Error", MB_IConerror);
			return;
		}
	}

	UINT NumberOfModes()
	{
		return m_displayModeList.size();
	}

	wstring GetDisplayModeAsString(UINT outputIndex, UINT DMIndex)
	{
		wstring output{};
		wstringstream outputStream{};

		EnumModes(outputIndex);

		outputStream << m_displayModeList.at(DMIndex).Width << " x " << m_displayModeList.at(DMIndex).Height;
		output = outputStream.str();

		return output;
	}

	void AddAdaptersToComboBox(HWND hWnd)
	{
		EnumAdapters();

		// Reset the combo box
		SendMessage(hWnd, CB_RESETCONTENT, 0, 0);

		// Fill out the adapters
		for (UINT i = 0; i < NumberOfAdapters(); ++i)
		{
			SendMessage(hWnd, CB_ADDSTRING, 0, (LPARAM)GetAdapterName(i).c_str());
		}

		// Set the primary adapter
		SendMessage(hWnd, CB_SETCURSEL, 0, 0);
	}

	void AddOutputsToComboBox(HWND hWnd, UINT adapterIndex)
	{
		EnumOutputs(adapterIndex);

		// Reset the combo box
		SendMessage(hWnd, CB_RESETCONTENT, 0, 0);

		// Fill out the adapters
		for (UINT i = 0; i < NumberOfOutputs(); ++i)
		{
			SendMessage(hWnd, CB_ADDSTRING, 0, (LPARAM)GetOutputName(i).c_str());
		}

		// Set the primary adapter
		SendMessage(hWnd, CB_SETCURSEL, 0, 0);
	}

	void AddModesToComboBox(HWND hWnd, UINT outputIndex)
	{
		EnumModes(outputIndex);

		// Reset the combo box
		SendMessage(hWnd, CB_RESETCONTENT, 0, 0);

		// Get the display modes
		for (UINT i = 0; i < NumberOfModes(); ++i)
		{
			SendMessage(hWnd, CB_ADDSTRING, 0, (LPARAM)GetDisplayModeAsString(outputIndex, i).c_str());
		}

		// Set the primary mode
		SendMessage(hWnd, CB_SETCURSEL, FindCLosestModeMatch(outputIndex), 0);
	}

	void GetAdapterInfo(UINT adapterIndex)
	{
		DXGI_ADAPTER_DESC3 desc{};
		m_vAdapters.at(adapterIndex)->GetDesc3(&desc);

		wstringstream info{};
		info << L"Adapter ID: " << desc.DeviceId \
			<< L"\nAdapter Name: " << desc.Description \
			<< L"\nDedicated System Memory: " << (desc.DedicatedSystemMemory / 1024) / 1024 << L" MB's" \
			<< L"\nDedicated Video Memory: " << (desc.DedicatedVideoMemory / 1024) / 1024 << L" MB's" \
			<< L"\nShared System Memory: " << (desc.SharedSystemMemory / 1024) / 1024 << L" MB's";

		MessageBox(nullptr, info.str().c_str(), desc.Description, MB_ICONINFORMATION);
	}

	void GetOutputInfo(UINT outputIndex)
	{
		DXGI_OUTPUT_DESC1 desc{};
		m_vAdapterOutputs.at(outputIndex)->GetDesc1(&desc);

		wstringstream info{};

		info << L"Device Name: " << desc.DeviceName \
			<< L"\nDepth: " << desc.BitsPerColor \
			<< L"\nCurrent Resolution" << (desc.DesktopCoordinates.right - desc.DesktopCoordinates.left) << " x " << (desc.DesktopCoordinates.bottom - desc.DesktopCoordinates.top);

		MessageBox(nullptr, info.str().c_str(), desc.DeviceName, MB_ICONINFORMATION);
	}

	UINT FindCLosestModeMatch(UINT outputIndex)
	{
		// Get Clostest matching DisplayMode
		DXGI_OUTPUT_DESC desc{};
		m_vAdapterOutputs.at(outputIndex)->GetDesc(&desc);

		for (auto iter = m_displayModeList.begin(); iter != m_displayModeList.end(); ++iter)
		{
			if (((long)iter->Width == desc.DesktopCoordinates.right - desc.DesktopCoordinates.left) && ((long)iter->Height == desc.DesktopCoordinates.bottom - desc.DesktopCoordinates.top))
			{
				UINT closestMatchIndex = distance(m_displayModeList.begin(), iter);
				return closestMatchIndex;
			}
		}

		return 0;
	}

	BOOL CALLBACK DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM)
	{
		HWND hFULL{};
		hFULL = GetDlgItem(hWnd, IDC_FULLSCREEN);
		HWND hWINDOW{};
		hWINDOW = GetDlgItem(hWnd, IDC_WINDOWED);
		HWND hADAPTER{};
		hADAPTER = GetDlgItem(hWnd, IDC_ADAPTER);
		HWND hMONITOR{};
		hMONITOR = GetDlgItem(hWnd, IDC_MONITOR);
		HWND hMODE{};
		hMODE = GetDlgItem(hWnd, IDC_MODE);

		// check message type
		switch (uMsg)
		{
		case WM_INITDIALOG:
		{
			SendMessage(hWINDOW, BM_SETCHECK, BST_CHECKED, 0);

			// =====================================
			// Now enumerator the display adapter
			AddAdaptersToComboBox(hADAPTER);
			// =====================================

			// =====================================
			// Enumerator the Outputs for the current selection of adapter
			// For Windows 10 by default the display monitor only used the 
			// primary adapter, in our case 0 index;
			//int adapterIndex = SendMessage(hADAPTER, (UINT)CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
			AddOutputsToComboBox(hMONITOR);
			// =========================================

			// =========================================
			// Enumerator the display modes and select closest matching to current setting
			//int outputIndex = SendMessage(hMONITOR, (UINT)CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
			AddModesToComboBox(hMODE);
			// =========================================

			return TRUE;
		}break;

		case WM_COMMAND:
			// here's where you would process commands sent to the dialog box
			switch (LOWORD(wParam))
			{
			case IDOK:
			{
				// OK button clicked - perform data validation and such here
				bool windowed = SendMessage(hFULL, BM_GETCHECK, 0, 0) != BST_CHECKED;
				UINT adapterIndex = SendMessage(hADAPTER, (UINT)CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
				UINT modeIndex = SendMessage(hMODE, (UINT)CB_GETCURSEL, (WPARAM)0, (LPARAM)0);

				// Get Final choices from dialog
				FinalChoice.adapter = m_vAdapters.at(adapterIndex);
				FinalChoice.mode = m_displayModeList.at(modeIndex);
				FinalChoice.bFullscreen = !windowed;
				EndDialog(hWnd, IDOK);
			}	break;

			case IDCANCEL:
				// Cancel button clicked
				EndDialog(hWnd, IDCANCEL);
				PostQuitMessage(0);
				break;

			case IDC_ADAPTER:
				if (HIWORD(wParam) == CBN_SELCHANGE)
				{
					// Get number of modes of current output
					//int adapterIndex = SendMessage(hADAPTER, (UINT)CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
					EnumOutputs(/*adapterIndex*/);

					AddOutputsToComboBox(hMONITOR/*, adapterIndex*/);

					int outputIndex = SendMessage(hMONITOR, (UINT)CB_GETCURSEL, (WPARAM)0, (LPARAM)0);

					AddModesToComboBox(hMODE, outputIndex);
				}
				break;

			case IDC_MONITOR:
				if (HIWORD(wParam) == CBN_SELCHANGE)
				{
					// Get number of modes of current adapter
					int outputIndex = SendMessage(hMONITOR, (UINT)CB_GETCURSEL, (WPARAM)0, (LPARAM)0);

					AddModesToComboBox(hMODE, outputIndex);
				}
				break;

			case IDC_ADAPTERINFO:
			{
				int adapterIndex = SendMessage(hADAPTER, (UINT)CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
				GetAdapterInfo(adapterIndex);
			}break;

			case IDC_OUTPUTINFO:
			{
				int outputIndex = SendMessage(hMONITOR, (UINT)CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
				GetOutputInfo(outputIndex);
			}break;

			}
			break;

		default:
			// return zero if we do not process this message
			return FALSE;
		}

		// return nonzero if we did process the message
		return TRUE;
	}

	BOOL DisplayDialog()
	{
		return DialogBox(GetModuleHandle(nullptr),                       // handle to the application
			MAKEINTRESOURCE(dlgAdapterSettings), // name of the dialog resource to use
			NULL,                            // handle to the dialog's parent window
			DialogProc);                     // name of the callback function
	}

	DialogChoices& GetFinalSelection()
	{
		return FinalChoice;
	}
}


// File: main.cpp

// Includes
#include "PCH.h"
#include "DirectXEnum.h"
#include "resource.h"

_Use_decl_annotations_
int APIENTRY wWinMain(HINSTANCE , HINSTANCE, LPWSTR, int )
{
	// Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
	_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif

	if (DirectXEnum::DisplayDialog() == 1) // if == 1 they clicked ok
	{
		wstringstream tmp{};
		if (!DirectXEnum::GetFinalSelection().bFullscreen)
			tmp << L"Starting in Windowed Mode. using Adapter: " << DirectXEnum::GetAdapterName(DirectXEnum::GetFinalSelection().adapter) << L" and display mode: " << DirectXEnum::GetFinalSelection().mode.Width << L" x " << DirectXEnum::GetFinalSelection().mode.Height << L"\n";
		else
			tmp << L"Starting In Fullscreen Mode. using Adapter: " << DirectXEnum::GetAdapterName(DirectXEnum::GetFinalSelection().adapter) << L" and display mode: " << DirectXEnum::GetFinalSelection().mode.Width << L" x " << DirectXEnum::GetFinalSelection().mode.Height << L"\n";

		OutputDebugString(tmp.str().c_str());
	}

	
		
	return 0;
}


#ifndef _PCH_H_
#define _PCH_H_

// Including SDKDDKVer.h defines the highest available Windows platform.
#include <SDKDDKVer.h>

// PreProcessor Defines
#ifndef UNICODE
#define UNICODE
#endif

#ifndef _UNICODE
#define _UNICODE
#endif

#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRALEAN
#define VC_EXTRALEAN

// Includes

//Includes WinRT stuffs
#include <Unknwn.h>
#include <winrt/base.h>
#include <gsl/gsl>

#if defined(DEBUG) || defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif

// WIN32 Includes
#include <windows.h>
#include <windowsx.h>

// STD Includes
#include <string>
#include <vector>
#include <sstream>

// DirectX Includes and Links
#include <d3d11_4.h>
#include <dxgi1_6.h>

#pragma comment(lib, "D3D11.lib")
#pragma comment(lib, "DXGI.lib")

// Libraries
#pragma comment(lib, "windowsapp.lib")
#pragma comment(lib, "Comctl32.lib")
#pragma comment(linker,"\"/manifestdependency:type='win32' \
    name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
    processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")

using namespace gsl;
using namespace std;
using namespace winrt;

#endif


Hope some people find some use for this, I've left out the RC file code as it should be easy enough to recreate, but I can post it if anyone wants me too.

Further updates in future.
Regards
Dave
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1