DirectX 11 No Members Found in DXGI_SWAP_CHAIN_DESC

MMS 27 1 Reputation point
2020-10-24T14:38:04.263+00:00

Hello, I am an Beginner to Direct11, I Dont know Why Visual Studio Intellisense tell me No Members found
This is my Direct3dcpp file

#include "Direct3d.h"
#include <cstdint>

    #include <dxgi.h>
    #pragma comment(lib,"d3d11.lib")

    class Direct : public Direct11
    {
    public:
     DXGI_SWAP_CHAIN_DESC sd = {};
     sd.BufferDesc.

     HRESULT hr;



    };

This is my Direct3d Header File

#pragma once
#include <Windows.h>
#include <d3d11.h>

class Direct11
{


public:
Direct11(HWND handle)
{

}

protected:
ID3D11Device* device;
IDXGIAdapter* d_adapter;
ID3D11DeviceContext* d_context;
IDXGISwapChain* d_swp_chain;


};

My Problem is I Cannot Access the Members of the DXGI_SWAP_CHAIN_DESC, Visual Studio Just Shows Errors
What Am i Supposed to Do

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,613 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,722 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 85,131 Reputation points
    2020-10-24T15:13:50.783+00:00

    The line

    sd.BufferDesc.
    

    is not in a function or other

    like, just for test :

    void test()
    {
       int n = sd.BufferDesc.Width;
    }
    

    where Intellisense works.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.