亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dxutgui.h

?? VC中使用C#作為腳本引擎編程
?? H
?? 第 1 頁 / 共 4 頁
字號:
//--------------------------------------------------------------------------------------
// File: DXUTgui.h
//
// Desc: 
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
#pragma once
#ifndef DXUT_GUI_H
#define DXUT_GUI_H

#include <usp10.h>
#include <dimm.h>


//--------------------------------------------------------------------------------------
// Defines and macros 
//--------------------------------------------------------------------------------------
#define EVENT_BUTTON_CLICKED                0x0101
#define EVENT_COMBOBOX_SELECTION_CHANGED    0x0201
#define EVENT_RADIOBUTTON_CHANGED           0x0301
#define EVENT_CHECKBOX_CHANGED              0x0401
#define EVENT_SLIDER_VALUE_CHANGED          0x0501
#define EVENT_EDITBOX_STRING                0x0601
// EVENT_EDITBOX_CHANGE is sent when the listbox content changes
// due to user input.
#define EVENT_EDITBOX_CHANGE                0x0602
#define EVENT_LISTBOX_ITEM_DBLCLK           0x0701
// EVENT_LISTBOX_SELECTION is fired off when the selection changes in
// a single selection list box.
#define EVENT_LISTBOX_SELECTION             0x0702
#define EVENT_LISTBOX_SELECTION_END         0x0703


//--------------------------------------------------------------------------------------
// Forward declarations
//--------------------------------------------------------------------------------------
class CDXUTDialogResourceManager;
class CDXUTControl;
class CDXUTButton;
class CDXUTStatic;
class CDXUTCheckBox;
class CDXUTRadioButton;
class CDXUTComboBox;
class CDXUTSlider;
class CDXUTEditBox;
class CDXUTIMEEditBox;
class CDXUTListBox;
class CDXUTScrollBar;
class CDXUTElement;
struct DXUTElementHolder;
struct DXUTTextureNode;
struct DXUTFontNode;
typedef VOID (CALLBACK *PCALLBACKDXUTGUIEVENT) ( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext );


//--------------------------------------------------------------------------------------
// Enums for pre-defined control types
//--------------------------------------------------------------------------------------
enum DXUT_CONTROL_TYPE 
{ 
    DXUT_CONTROL_BUTTON, 
    DXUT_CONTROL_STATIC, 
    DXUT_CONTROL_CHECKBOX,
    DXUT_CONTROL_RADIOBUTTON,
    DXUT_CONTROL_COMBOBOX,
    DXUT_CONTROL_SLIDER,
    DXUT_CONTROL_EDITBOX,
    DXUT_CONTROL_IMEEDITBOX,
    DXUT_CONTROL_LISTBOX,
    DXUT_CONTROL_SCROLLBAR,
};

enum DXUT_CONTROL_STATE
{
    DXUT_STATE_NORMAL = 0,
    DXUT_STATE_DISABLED,
    DXUT_STATE_HIDDEN,
    DXUT_STATE_FOCUS,
    DXUT_STATE_MOUSEOVER,
    DXUT_STATE_PRESSED,
};

#define MAX_CONTROL_STATES 6

struct DXUTBlendColor
{
    void Init( D3DCOLOR defaultColor, D3DCOLOR disabledColor = D3DCOLOR_ARGB(200, 128, 128, 128), D3DCOLOR hiddenColor = 0 );
    void Blend( UINT iState, float fElapsedTime, float fRate = 0.7f );
    
    D3DCOLOR  States[ MAX_CONTROL_STATES ]; // Modulate colors for all possible control states
    D3DXCOLOR Current;
};


//-----------------------------------------------------------------------------
// Contains all the display tweakables for a sub-control
//-----------------------------------------------------------------------------
class CDXUTElement
{
public:
    void SetTexture( UINT iTexture, RECT* prcTexture, D3DCOLOR defaultTextureColor = D3DCOLOR_ARGB(255, 255, 255, 255) );
    void SetFont( UINT iFont, D3DCOLOR defaultFontColor = D3DCOLOR_ARGB(255, 255, 255, 255), DWORD dwTextFormat = DT_CENTER | DT_VCENTER );
    
    void Refresh();
    
    UINT iTexture;          // Index of the texture for this Element 
    UINT iFont;             // Index of the font for this Element
    DWORD dwTextFormat;     // The format argument to DrawText 

    RECT rcTexture;         // Bounding rect of this element on the composite texture
    
    DXUTBlendColor TextureColor;
    DXUTBlendColor FontColor;
};


//-----------------------------------------------------------------------------
// All controls must be assigned to a dialog, which handles
// input and rendering for the controls.
//-----------------------------------------------------------------------------
class CDXUTDialog
{
    friend class CDXUTDialogResourceManager;

public:
    CDXUTDialog();
    ~CDXUTDialog();

    // Need to call this now
    void Init( CDXUTDialogResourceManager* pManager, bool bRegisterDialog = true );
    void Init( CDXUTDialogResourceManager* pManager, bool bRegisterDialog, LPCWSTR pszControlTextureFilename );
    void Init( CDXUTDialogResourceManager* pManager, bool bRegisterDialog, LPCWSTR szControlTextureResourceName, HMODULE hControlTextureResourceModule );

    // Windows message handler
    bool MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );

    // Control creation
    HRESULT AddStatic( int ID, LPCWSTR strText, int x, int y, int width, int height, bool bIsDefault=false, CDXUTStatic** ppCreated=NULL );
    HRESULT AddButton( int ID, LPCWSTR strText, int x, int y, int width, int height, UINT nHotkey=0, bool bIsDefault=false, CDXUTButton** ppCreated=NULL );
    HRESULT AddCheckBox( int ID, LPCWSTR strText, int x, int y, int width, int height, bool bChecked=false, UINT nHotkey=0, bool bIsDefault=false, CDXUTCheckBox** ppCreated=NULL );
    HRESULT AddRadioButton( int ID, UINT nButtonGroup, LPCWSTR strText, int x, int y, int width, int height, bool bChecked=false, UINT nHotkey=0, bool bIsDefault=false, CDXUTRadioButton** ppCreated=NULL );
    HRESULT AddComboBox( int ID, int x, int y, int width, int height, UINT nHotKey=0, bool bIsDefault=false, CDXUTComboBox** ppCreated=NULL );
    HRESULT AddSlider( int ID, int x, int y, int width, int height, int min=0, int max=100, int value=50, bool bIsDefault=false, CDXUTSlider** ppCreated=NULL );
    HRESULT AddEditBox( int ID, LPCWSTR strText, int x, int y, int width, int height, bool bIsDefault=false, CDXUTEditBox** ppCreated=NULL );
    HRESULT AddIMEEditBox( int ID, LPCWSTR strText, int x, int y, int width, int height, bool bIsDefault=false, CDXUTIMEEditBox** ppCreated=NULL );
    HRESULT AddListBox( int ID, int x, int y, int width, int height, DWORD dwStyle=0, CDXUTListBox** ppCreated=NULL );
    HRESULT AddControl( CDXUTControl* pControl );
    HRESULT InitControl( CDXUTControl* pControl );

    // Control retrieval
    CDXUTStatic*      GetStatic( int ID ) { return (CDXUTStatic*) GetControl( ID, DXUT_CONTROL_STATIC ); }
    CDXUTButton*      GetButton( int ID ) { return (CDXUTButton*) GetControl( ID, DXUT_CONTROL_BUTTON ); }
    CDXUTCheckBox*    GetCheckBox( int ID ) { return (CDXUTCheckBox*) GetControl( ID, DXUT_CONTROL_CHECKBOX ); }
    CDXUTRadioButton* GetRadioButton( int ID ) { return (CDXUTRadioButton*) GetControl( ID, DXUT_CONTROL_RADIOBUTTON ); }
    CDXUTComboBox*    GetComboBox( int ID ) { return (CDXUTComboBox*) GetControl( ID, DXUT_CONTROL_COMBOBOX ); }
    CDXUTSlider*      GetSlider( int ID ) { return (CDXUTSlider*) GetControl( ID, DXUT_CONTROL_SLIDER ); }
    CDXUTEditBox*     GetEditBox( int ID ) { return (CDXUTEditBox*) GetControl( ID, DXUT_CONTROL_EDITBOX ); }
    CDXUTIMEEditBox*  GetIMEEditBox( int ID ) { return (CDXUTIMEEditBox*) GetControl( ID, DXUT_CONTROL_IMEEDITBOX ); }
    CDXUTListBox*     GetListBox( int ID ) { return (CDXUTListBox*) GetControl( ID, DXUT_CONTROL_LISTBOX ); }

    CDXUTControl* GetControl( int ID );
    CDXUTControl* GetControl( int ID, UINT nControlType );
    CDXUTControl* GetControlAtPoint( POINT pt );

    bool GetControlEnabled( int ID );
    void SetControlEnabled( int ID, bool bEnabled );

    void ClearRadioButtonGroup( UINT nGroup );
    void ClearComboBox( int ID );

    // Access the default display Elements used when adding new controls
    HRESULT       SetDefaultElement( UINT nControlType, UINT iElement, CDXUTElement* pElement );
    CDXUTElement* GetDefaultElement( UINT nControlType, UINT iElement );

    // Methods called by controls
    void SendEvent( UINT nEvent, bool bTriggeredByUser, CDXUTControl* pControl );
    void RequestFocus( CDXUTControl* pControl );

    // Render helpers
    HRESULT DrawRect( RECT* pRect, D3DCOLOR color );
    HRESULT DrawPolyLine( POINT* apPoints, UINT nNumPoints, D3DCOLOR color );
    HRESULT DrawSprite( CDXUTElement* pElement, RECT* prcDest );
    HRESULT CalcTextRect( LPCWSTR strText, CDXUTElement* pElement, RECT* prcDest, int nCount = -1 );
    HRESULT DrawText( LPCWSTR strText, CDXUTElement* pElement, RECT* prcDest, bool bShadow = false, int nCount = -1 );

    // Attributes
    bool GetVisible() { return m_bVisible; }
    void SetVisible( bool bVisible ) { m_bVisible = bVisible; }
    bool GetMinimized() { return m_bMinimized; }
    void SetMinimized( bool bMinimized ) { m_bMinimized = bMinimized; }
    void SetBackgroundColors( D3DCOLOR colorAllCorners ) { SetBackgroundColors( colorAllCorners, colorAllCorners, colorAllCorners, colorAllCorners ); }
    void SetBackgroundColors( D3DCOLOR colorTopLeft, D3DCOLOR colorTopRight, D3DCOLOR colorBottomLeft, D3DCOLOR colorBottomRight );
    void EnableCaption( bool bEnable ) { m_bCaption = bEnable; }
    int GetCaptionHeight() const { return m_nCaptionHeight; }
    void SetCaptionHeight( int nHeight ) { m_nCaptionHeight = nHeight; }
    void SetCaptionText( const WCHAR *pwszText ) { StringCchCopy( m_wszCaption, sizeof(m_wszCaption)/sizeof(m_wszCaption[0]), pwszText); }
    void GetLocation( POINT &Pt ) const { Pt.x = m_x; Pt.y = m_y; }
    void SetLocation( int x, int y ) { m_x = x; m_y = y; }
    void SetSize( int width, int height ) { m_width = width; m_height = height;  }
    int GetWidth() { return m_width; }
    int GetHeight() { return m_height; }

    static void SetRefreshTime( float fTime ){ s_fTimeRefresh = fTime; }

    static CDXUTControl* GetNextControl( CDXUTControl* pControl );
    static CDXUTControl* GetPrevControl( CDXUTControl* pControl );

    void RemoveControl( int ID );
    void RemoveAllControls();

    // Sets the callback used to notify the app of control events
    void SetCallback( PCALLBACKDXUTGUIEVENT pCallback, void* pUserContext = NULL );
    void EnableNonUserEvents( bool bEnable ) { m_bNonUserEvents = bEnable; }
    void EnableKeyboardInput( bool bEnable ) { m_bKeyboardInput = bEnable; }
    void EnableMouseInput( bool bEnable ) { m_bMouseInput = bEnable; }
    bool IsKeyboardInputEnabled() const { return m_bKeyboardInput; }

    // Device state notification
    void Refresh();
    HRESULT OnRender( float fElapsedTime );

    // Shared resource access. Indexed fonts and textures are shared among
    // all the controls.
    HRESULT       SetFont( UINT index, LPCWSTR strFaceName, LONG height, LONG weight );
    DXUTFontNode* GetFont( UINT index );

    HRESULT          SetTexture( UINT index, LPCWSTR strFilename );
    HRESULT          SetTexture( UINT index, LPCWSTR strResourceName, HMODULE hResourceModule );
    DXUTTextureNode* GetTexture( UINT index );

    CDXUTDialogResourceManager* GetManager() { return m_pManager; }

    static void ClearFocus();
    void FocusDefaultControl();

    bool m_bNonUserEvents;
    bool m_bKeyboardInput;
    bool m_bMouseInput;



private:
    int m_nDefaultControlID;

    static double s_fTimeRefresh;
    double m_fTimeLastRefresh;

    // Initialize default Elements
    void InitDefaultElements();

    // Windows message handlers
    void OnMouseMove( POINT pt );
    void OnMouseUp( POINT pt );

    void SetNextDialog( CDXUTDialog* pNextDialog );

    // Control events
    bool OnCycleFocus( bool bForward );

    static CDXUTControl* s_pControlFocus;        // The control which has focus
    static CDXUTControl* s_pControlPressed;      // The control currently pressed

    CDXUTControl* m_pControlMouseOver;           // The control which is hovered over

    bool m_bVisible;
    bool m_bCaption;
    bool m_bMinimized;
    bool m_bDrag;
    WCHAR m_wszCaption[256];

    int m_x;
    int m_y;
    int m_width;
    int m_height;
    int m_nCaptionHeight;

    D3DCOLOR m_colorTopLeft;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成网站在线| 国产激情一区二区三区桃花岛亚洲| 在线成人av影院| 成人h精品动漫一区二区三区| 美女任你摸久久| 日韩国产欧美在线观看| 亚洲二区在线视频| 一区二区在线观看免费| 亚洲九九爱视频| 一区二区在线免费| 亚洲自拍偷拍综合| 婷婷丁香久久五月婷婷| 日韩国产精品91| 久久69国产一区二区蜜臀| 九九九精品视频| 蜜桃精品视频在线观看| 久久国产精品色| 精品一区二区三区免费| 日本亚洲三级在线| 精品一区二区三区影院在线午夜 | 在线亚洲免费视频| 色婷婷综合久久久久中文 | 轻轻草成人在线| 精品综合免费视频观看| 韩国av一区二区| 99综合电影在线视频| 在线视频一区二区免费| 日韩一二三四区| 国产精品欧美久久久久无广告| 中文字幕欧美日韩一区| 一区二区三区四区中文字幕| 日本91福利区| 国产成人综合在线播放| 91久久香蕉国产日韩欧美9色| 欧美精品精品一区| 中文字幕精品在线不卡| 亚洲va国产va欧美va观看| 黄网站免费久久| 色8久久精品久久久久久蜜| 日韩视频一区二区| 自拍偷拍亚洲激情| 麻豆视频一区二区| 日本精品免费观看高清观看| 欧美一区二区三区思思人| 中文字幕av一区二区三区免费看 | 欧美一级理论性理论a| 日本一区二区综合亚洲| 亚洲一区二区三区小说| 国产成人鲁色资源国产91色综| 日本道色综合久久| 国产日韩欧美高清在线| 日韩精品91亚洲二区在线观看| 国产成人精品免费在线| 6080亚洲精品一区二区| 亚洲视频 欧洲视频| 国产精品中文欧美| 日韩视频中午一区| 亚洲欧美日韩一区| 国产成人av电影在线| 日韩三级电影网址| 亚洲午夜久久久久| 91丝袜国产在线播放| 国产欧美日韩精品a在线观看| 免费人成在线不卡| 欧美伦理电影网| 亚洲男人的天堂一区二区| 国产成人精品www牛牛影视| 欧美不卡一二三| 日韩精品一二三四| 欧美片网站yy| 无吗不卡中文字幕| 欧美精品日韩精品| 亚洲成a人在线观看| 欧美亚洲尤物久久| 亚洲国产精品一区二区久久| 色综合天天综合狠狠| 国产精品免费视频一区| 豆国产96在线|亚洲| 欧美国产一区二区在线观看| 免费在线观看视频一区| 欧美日韩一区二区电影| 丝袜美腿一区二区三区| 欧美日韩一区成人| 麻豆精品一区二区三区| 日韩欧美专区在线| 久久99精品国产91久久来源| 精品国产一区二区三区不卡 | 日韩国产在线观看一区| 91麻豆精品国产综合久久久久久| 亚瑟在线精品视频| 欧美一区二区三区视频免费播放| 青青青爽久久午夜综合久久午夜| 欧美一激情一区二区三区| 麻豆免费看一区二区三区| 久久精品在线免费观看| 成人av免费网站| 亚洲欧美成aⅴ人在线观看| 欧美日韩一区二区三区高清 | 国产精品视频免费看| 成人av在线一区二区三区| 亚洲图片欧美激情| 欧美日韩二区三区| 久久精品国产精品亚洲红杏| 国产欧美精品一区二区色综合| 99综合电影在线视频| 五月激情丁香一区二区三区| 久久尤物电影视频在线观看| 97精品国产97久久久久久久久久久久 | www.欧美.com| 亚洲国产毛片aaaaa无费看 | 亚洲欧美一区二区三区极速播放| 色婷婷综合久久久| 免费不卡在线观看| 国产精品国产馆在线真实露脸| 欧美午夜一区二区| 国产在线一区观看| 亚洲一区视频在线| 国产日本亚洲高清| 欧美日韩一区二区在线视频| 国产在线日韩欧美| 午夜精品久久久久| 亚洲色图色小说| 欧美精品一区二区三区在线播放| 成人一区二区视频| 日韩激情一二三区| 亚洲日本一区二区三区| 精品国产三级a在线观看| 欧美在线观看一区| 成人精品gif动图一区| 美女高潮久久久| 亚洲高清不卡在线观看| 国产精品麻豆99久久久久久| 精品少妇一区二区三区在线播放| 在线区一区二视频| 91亚洲男人天堂| 成人一级片网址| 久国产精品韩国三级视频| 亚洲6080在线| 一区二区三区四区五区视频在线观看 | 奇米亚洲午夜久久精品| 亚洲同性gay激情无套| 国产精品无圣光一区二区| 欧美成人r级一区二区三区| 欧美精品一卡两卡| 在线观看一区日韩| 一本色道久久加勒比精品| 成人午夜激情影院| 国产成人综合网| 国产美女在线观看一区| 麻豆一区二区99久久久久| 日韩avvvv在线播放| 久久久精品tv| 26uuu成人网一区二区三区| 欧美一级夜夜爽| 日韩一级高清毛片| 欧美大片一区二区| 日韩欧美一区二区三区在线| 69堂成人精品免费视频| 欧美妇女性影城| 欧美一级电影网站| 精品久久久久久久久久久院品网 | 成人99免费视频| 国产成a人亚洲精品| 成人97人人超碰人人99| 91色在线porny| 91麻豆swag| 欧美在线|欧美| 欧美丰满少妇xxxxx高潮对白| 欧美高清一级片在线| 日韩精品一区二区三区在线观看 | 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 国产精品免费免费| 精品久久久三级丝袜| 精品福利视频一区二区三区| 欧美成va人片在线观看| 中文在线资源观看网站视频免费不卡| 久久婷婷一区二区三区| 国产日本亚洲高清| 亚洲一区二区三区四区五区黄| 香蕉久久夜色精品国产使用方法| 五月天欧美精品| 国产乱人伦偷精品视频不卡| jiyouzz国产精品久久| 色婷婷av一区二区三区gif| 欧美日韩国产影片| 日本一区二区三区在线不卡| 专区另类欧美日韩| 日本aⅴ免费视频一区二区三区 | 久久99热这里只有精品| 国产成人夜色高潮福利影视| 色综合久久中文综合久久牛| 91麻豆精品国产91| 国产精品天天摸av网| 亚洲成人精品影院| 国产高清视频一区| 5566中文字幕一区二区电影| 国产精品视频麻豆| 日韩高清不卡一区二区三区| k8久久久一区二区三区| 精品久久久三级丝袜|