#pragma once
#include "global.h"
#include "MyStructDef.h"
class CMyPicBox : public CDialog
{
	DECLARE_DYNAMIC(CMyPicBox)
	DECLARE_MESSAGE_MAP()
public:
	CMyPicBox(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CMyPicBox();
	// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_CMYPICBOX };
#endif
	void Draw();
	void SetPic(CString pngName);
protected:
	void DoDataExchange(CDataExchange* pDX) override;
	BOOL OnInitDialog() override;
public:
	afx_msg void OnPaint();
	afx_msg void OnSize(UINT nType, int cx, int cy);
private:
	CString picCurrent;
	MyDX11Renderer pRenderer;
	std::unordered_map<std::wstring, MyTextureAndSRV> loadedTexture;
	MyTextureAndSRV tas_nullpxa;
	ID3D11ShaderResourceView* GetTexture(CString pngName);
};

