<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                在編寫一些軟件時,我們會比較偏向于比較簡潔、清新的用戶界面,同時為了避免其它程序或者桌面等影響使用者的注意力等,我們通常習慣將軟件界面全屏,布滿整個顯示屏幕,與此同時,我們也將對界面中的控件位置進行相應的調整,讓它們按屏幕的大小和其在對話框中的相對位置,居中顯示。 下面結合實例說明(完整實例可在我的CSDN資源中下載:[http://download.csdn.net/detail/margin1988/8337049](http://download.csdn.net/detail/margin1988/8337049)): 在對話框的初始化函數OnInitDialog()中分三步作如下的操作: (1)獲取屏幕的分辨率 ~~~ int nFullWidth=GetSystemMetrics(SM_CXSCREEN); int nFullHeight=GetSystemMetrics(SM_CYSCREEN); ~~~ (2)控件居中顯示 ~~~ CRect c1,c2; GetClientRect(c1); //獲取窗口客戶區的坐標 for (int i=IDC_BUTTON1;i<=IDC_BUTTON5;i++) { GetDlgItem(i)->GetWindowRect(c2); //獲取窗口的邊框矩形的尺寸 ScreenToClient(c2); //把屏幕上指定點的屏幕坐標轉換成用戶坐標 GetDlgItem(i)->SetWindowPos(NULL,(nFullWidth-c1.right)/2+c2.left, (nFullHeight-c1.bottom)/2+c2.top,0,0,SWP_NOZORDER|SWP_NOSIZE); } ~~~ (3)對話框全屏顯示(去掉了標題欄) ~~~ CRect m_FullScreenRect; CRect WindowRect; GetWindowRect(&WindowRect); CRect ClientRect; RepositionBars(0, 0xFFFF, AFX_IDW_PANE_FIRST, CWnd::reposQuery, &ClientRect); ClientToScreen(&ClientRect); m_FullScreenRect.left=WindowRect.left-ClientRect.left; m_FullScreenRect.top=WindowRect.top-ClientRect.top; m_FullScreenRect.right=WindowRect.right-ClientRect.right+nFullWidth; m_FullScreenRect.bottom=WindowRect.bottom-ClientRect.bottom+nFullHeight; WINDOWPLACEMENT wndpl; wndpl.length=sizeof(WINDOWPLACEMENT); wndpl.flags=0; wndpl.showCmd=SW_SHOWNORMAL; wndpl.rcNormalPosition=m_FullScreenRect; SetWindowPlacement(&wndpl); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看