• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            天行健 君子當(dāng)自強(qiáng)而不息

            DXUT框架剖析(9)

            下面列出允許改變DXUT行為和獲取內(nèi)部變量的函數(shù),這些函數(shù)在使用DXUT框架的Direct3D程序中是非常實(shí)用的。

             

            管理窗口的DXUT函數(shù)

            函數(shù) 描述
            DXUTGetHINSTANCE 獲取應(yīng)用程序?qū)嵗木浔?/font>
            DXUTGetHWND 獲取當(dāng)前設(shè)備窗口的句柄
            DXUTGetHWNDFocus 獲取當(dāng)前獲得焦點(diǎn)的窗口的句柄
            DXUTGetHWNDDeviceFullScreen 獲取全屏模式設(shè)備窗口的句柄
            DXUTGetHWNDDeviceWindowed 獲取窗口模式設(shè)備窗口的句柄
            DXUTGetWindowClientRect 獲取應(yīng)用程序設(shè)備窗口的客戶區(qū)矩形
            DXUTGetWindowTitle 獲取指向應(yīng)用程序窗口標(biāo)題的指針
            DXUTIsWindowed 檢查應(yīng)用程序是否處在窗口模式下

             

            DXUTGetHINSTANCE

            Get a handle to the application instance.

            HINSTANCE DXUTGetHINSTANCE();

            Parameters

            None.

            Return Values

            A handle to the application instance.

             

            DXUTGetHWND

            Get a handle to the current device window.

            HWND DXUTGetHWND();

            Parameters

            None.

            Return Values

            A handle to the current device window.

             

            DXUTGetHWNDFocus

            Get the handle of the focus window.

            HWND DXUTGetHWNDFocus();

            Parameters

            None.

            Return Values

            Handle to the focus window.

            Remarks

            The focus window informs Direct3D when the application is switched to a background window with an ALT+TAB key entry, a mouse click, or by other means. It is typically the same window as the device window.

             

            DXUTGetHWNDDeviceFullScreen

            Get the handle of the device window used when the application is fullscreen.

            HWND DXUTGetHWNDDeviceFullScreen();

            Parameters

            None.

            Return Values

            Returns a handle of the device window used when the application is fullscreen.

             

            DXUTGetHWNDDeviceWindowed

            Get the handle of the device window used when the application is windowed.

            HWND DXUTGetHWNDDeviceWindowed();

            Parameters

            None.

            Return Values

            Returns a handle of the device window used when the application is windowed.

             

            DXUTGetWindowClientRect

            Get the current client RECT of the application window.

            CONST RECT * DXUTGetWindowClientRect();

            Parameters

            None.

            Return Values

            Returns the current client RECT of the application window.

             

            DXUTGetWindowTitle

            Get a pointer to a string containing the application window title.

            LPCWSTR DXUTGetWindowTitle();

            Parameters

            None.

            Return Values

            Pointer to a string containing the application window title.

             

            DXUTIsWindowed

            Indicates whether the application is in windowed mode.

            BOOL DXUTIsWindowed();

            Parameters

            None.

            Return Values

            If TRUE, the application is in windowed mode. If the application is not in windowed mode, or no device exists, then FALSE is returned.

             

            管理設(shè)備的DXUT函數(shù)

            函數(shù) 描述
            DXUTSetCursorSettings 為全屏模式下光標(biāo)的用法設(shè)置選項(xiàng)
            DXUTSetMultimonSettings 為框架如何在多顯示器配置中工作設(shè)置選項(xiàng)
            DXUTToggleFullscreen 使應(yīng)用程序在窗口模式和全屏模式間切換
            DXUTToggleREF 使應(yīng)用程序在硬件抽象層和參考設(shè)備間切換

             

            DXUTSetCursorSettings

            Sets options for cursor usage in full-screen mode.

            HRESULT DXUTSetCursorSettings(
            bool bShowCursorWhenFullScreen,
            bool bClipCursorWhenFullScreen
            );

            Parameters

            bShowCursorWhenFullScreen
            [in] Cursor visibility flag. If true, the cursor will be visible when the application is running in full-screen mode.
            bClipCursorWhenFullScreen
            [in] Cursor clipping flag. If true, the cursor will be restricted from exiting the screen boundaries when the application is running in full screen mode.

            Return Values

            If the function succeeds, the return value is S_OK. If the function fails, the return value can be one of the error codes in DXUTERR.

             

            DXUTSetMultimonSettings

            Sets options for how DXUT functions on multiple monitors.

            VOID DXUTSetMultimonSettings(
            BOOL bAutoChangeAdapter
            );

            Parameters

            bAutoChangeAdapter
            [in] If TRUE and the application window is relocated to a different monitor, DXUT will automatically change to use the new monitor's adapter, and device callback functions will be called to recreate the scene.

            Return Values

            No return value.

             

            DXUTToggleFullscreen

            Switches the application between windowed and full-screen modes.

            HRESULT DXUTToggleFullscreen();

            Parameters

            None.

            Return Values

            If the function succeeds, the return value is S_OK. If the function fails, the return value can be one of the error codes in DXUTERR.

            Remarks

            This function works regardless of which Direct3D API version the application is using.

            Toggling between windowed and full-screen modes will result in swap chain being resized if using Direct3D 10, or the device being reset or recreated if using Direct3D 9.

             

            DXUTToggleREF

            Switches the application between HAL and reference device types.

            HRESULT DXUTToggleREF();

            Parameters

            None.

            Return Values

            If the function succeeds, the return value is S_OK. If the function fails, the return value can be one of the error codes in DXUTERR.

            Remarks

            This function works regardless of which Direct3D API version the application is using.


            posted on 2008-05-16 19:13 lovedday 閱讀(1143) 評(píng)論(0)  編輯 收藏 引用


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            公告

            導(dǎo)航

            統(tǒng)計(jì)

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關(guān)鏈接

            搜索

            最新評(píng)論

            99久久国产亚洲高清观看2024| 欧美亚洲国产精品久久高清| 1000部精品久久久久久久久| 99久久国产主播综合精品 | 久久久久久精品免费看SSS | 99久久精品免费看国产一区二区三区 | 欧美丰满熟妇BBB久久久| AV无码久久久久不卡蜜桃| 久久精品免费大片国产大片| 欧美黑人又粗又大久久久| 无码国内精品久久人妻麻豆按摩| 久久人人爽人人爽人人片AV不| 久久精品国产秦先生| 亚洲综合日韩久久成人AV| 久久国产成人| 亚洲国产精品久久久久久| 久久夜色精品国产噜噜麻豆 | 久久综合综合久久综合| 久久天天躁狠狠躁夜夜2020老熟妇 | 久久综合色区| 99久久免费国产精品| 久久精品国产亚洲av影院| 精品一二三区久久aaa片| 久久久久女教师免费一区| 草草久久久无码国产专区| 国产麻豆精品久久一二三| 性高湖久久久久久久久AAAAA| 久久综合久久综合久久| 久久99精品久久久久婷婷| 77777亚洲午夜久久多人| 伊人久久大香线蕉综合影院首页| 伊人久久大香线蕉AV一区二区| 国产精品成人99久久久久| 久久99精品久久久久久动态图 | 久久综合久久自在自线精品自| 亚洲日本久久久午夜精品| 亚洲国产小视频精品久久久三级 | 久久久老熟女一区二区三区| 久久久久久久女国产乱让韩| 久久人人爽人人爽人人片AV高清| av色综合久久天堂av色综合在|