• <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>

            山寨:不是最好的,是最適合我們的!歡迎體驗山寨 中文版MSDN

            Blog @ Blog

            當華美的葉片落盡,生命的脈絡才歷歷可見。 -- 聶魯達

            常用鏈接

            統計

            積分與排名

            BBS

            Blog

            Web

            最新評論

            三方法改變每個標簽頁標題

            概要

            CPropertySheet 的選項卡中顯示文本是通常取自的對話框模板資源中每個 CPropertyPage 標題。 還有一些其他方法, 可被用來選擇對于每一頁標題

            您可用來選擇以下三方法改變每個標簽頁標題

            1、構造 CPropertyPage 函數具有 UINT nIDCaption 參數可用于指定 ID 字符串資源。 默認值為 0 (表示要使用對話框模板標題) 但可標識任何有效字符串資源。
            2、CPropertyPage 有稱為 m_psp, 是 PROPSHEETPAGE 結構成員。 您可以設置此結構的 dwFlags 元素和 PSP_USETITLE pszTitle 指向字符串將用作標題只能使用此方法之前調用 Create() DoModal()
            3.    如果要更改標簽中文本, 表創建后可以調用 PropertySheet::GetTabControl() 以獲取 CTabCtrl 指針。 然后可以填寫 TC_ITEM 結構, 并使用 CTabCtrl 指針, 調用 CTabCtrl::SetItem() 以設置文本對每個選項卡。
            示例代碼
            /* Compile options needed:  Default
            */
             

            // CMySheet is derived from CPropertySheet.
            // CPage1 is derived from CPropertyPage.

            //METHOD ONE ======================================================
            // passing the string ID to the constructor. ClassWizard does not
            // generate a constructor that takes the caption ID as a parameter,
            // so it may be necessary to modify the CPage1's constructor
            class CPage1 : public CPropertyPage
            {
            // 

            public:
                CPage1(UINT nIDCaption 
            = 0);

            // 
            }
            ;

            CPage1::CPage1(UINT nIDCaption) :
                          CPropertyPage(CMyPage::IDD, nIDCaption)
            {
                
            //{{AFX_DATA_INIT(CMyPage)
                    
            // NOTE: the ClassWizard will add member initialization here
                
            //}}AFX_DATA_INIT
            }


            // Use the class's constructor to pass the string ID
            CMyView::ShowPropertySheet ()
            {
                m_pSheet 
            = new CMySheet ("Sheet Title");
                ASSERT (m_pSheet);
                m_pPage1 
            = new CPage1(IDS_MYCAPTION); // id of string resource
                ASSERT (m_pPage1);

                m_pSheet
            ->DoModal ();
            }


            // METHOD TWO ======================================================
            // this shows how to change the title of a CPropertyPage before the
            // call to DoModal()
            CMyView::ShowPropertySheet ()
            {
                m_pSheet 
            = new CMySheet ("Sheet Title");
                ASSERT (m_pSheet);
                m_pPage1 
            = new CPage1;
                ASSERT (m_pPage1);

                m_pPage1
            ->m_psp.dwFlags |= PSP_USETITLE;
                m_pPage1
            ->m_psp.pszTitle = _T("My Caption");

                m_pSheet
            ->DoModal ();
            }


            // METHOD THREE ======================================================
            // This function allows you to pass the index number of a
            // CPropertyPage and a string to set the title to.
            BOOL CMySheet::SetPageTitle (int nPage, LPTSTR pszText)
            {
                CTabCtrl
            * pTab = GetTabControl();
                ASSERT (pTab);

                TC_ITEM ti;
                ti.mask 
            = TCIF_TEXT;
                ti.pszText 
            = pszText;
                VERIFY (pTab
            ->SetItem (nPage, &ti));

                
            return TRUE;
            }

            posted on 2008-12-25 16:08 isabc 閱讀(1455) 評論(0)  編輯 收藏 引用 所屬分類: VC Function

            廣告信息(免費廣告聯系)

            中文版MSDN:
            歡迎體驗

            久久精品一本到99热免费| 久久99精品久久久久久久久久 | 亚洲AⅤ优女AV综合久久久| 色婷婷噜噜久久国产精品12p| 亚洲国产综合久久天堂| 久久精品国产亚洲AV电影| 夜夜亚洲天天久久| 久久九九兔免费精品6| 免费国产99久久久香蕉| 亚洲成色WWW久久网站| 亚洲精品成人网久久久久久| 性欧美丰满熟妇XXXX性久久久| 久久综合综合久久狠狠狠97色88| 看全色黄大色大片免费久久久| 久久久亚洲欧洲日产国码aⅴ | 久久久久这里只有精品| 久久精品一区二区三区AV| 久久国产视频99电影| 国产精品久久久久久| 亚洲国产精品无码久久久不卡| 久久美女人爽女人爽| 一本一道久久综合狠狠老| | 亚洲精品国精品久久99热一| 国产精品99久久久久久www| 精品无码久久久久久午夜| 亚洲欧美日韩久久精品| 国产激情久久久久影院| 热久久这里只有精品| 2021久久国自产拍精品| 久久久久久夜精品精品免费啦| 久久久久亚洲AV片无码下载蜜桃| 久久久久综合中文字幕| 精品久久久久一区二区三区| 久久久久亚洲AV无码专区桃色| 97久久超碰成人精品网站| 亚洲成色www久久网站夜月| 久久久久久综合网天天| 久久久久人妻一区二区三区| 亚洲精品乱码久久久久久中文字幕| 久久91精品国产91|