横秋扫盲系列(3): CPropertySheet 属性对话框 -- 2005-8-21 17:48:23[2]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

b.NOTIFY的响应 如:Disable 某个TAB
BOOL CMySheet::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
   {
       NMHDR* pnmh = (NMHDR*)lParam;
       // tab is about to change
       if (TCN_SELCHANGING == pnmh->code)
           // save the current page index
           m_nLastActive = GetActiveIndex ();
       // tab has been changed
       else if (TCN_SELCHANGE == pnmh->code)
       {
           // get the current page index
           int nCurrentPage = GetActiveIndex ();
           // if current page is in our map of disabled pages
           if (m_DisabledPages.Lookup (nCurrentPage, nCurrentPage))
           // activate the previous page
           PostMessage (PSM_SETCURSEL, m_nLastActive);
       }
       return CPropertySheet::OnNotify(wParam, lParam, pResult);
   }

本文关键:横秋扫盲系列(3): CPropertySheet 属性对话框 -- 2005-8-21 17:48:23
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top