/[H6]/MyTabCtrl.cpp
ViewVC logotype

Diff of /MyTabCtrl.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by torben, Wed Aug 30 21:57:57 2006 UTC revision 12 by torben, Thu Aug 31 09:02:02 2006 UTC
# Line 6  Line 6 
6  #include "MyTabCtrl.h"  #include "MyTabCtrl.h"
7  #include ".\mytabctrl.h"  #include ".\mytabctrl.h"
8    
9    #include "CommonStorage.h"
10  #include "SearchDialog.h"  #include "SearchDialog.h"
11  #include "AdminDialog.h"  #include "AdminDialog.h"
12  #include "ResultDialog.h"  #include "ResultDialog.h"
# Line 54  void CMyTabCtrl::Init(void) Line 55  void CMyTabCtrl::Init(void)
55          m_tabs[1]->ShowWindow(SW_HIDE);          m_tabs[1]->ShowWindow(SW_HIDE);
56          m_tabs[2]->ShowWindow(SW_HIDE);          m_tabs[2]->ShowWindow(SW_HIDE);
57          SetRectangle();          SetRectangle();
58            
59            CommonStorage::Instance()->setTabCtrl(this);
60  }  }
61    
62  void CMyTabCtrl::SetRectangle(void)  void CMyTabCtrl::SetRectangle(void)
# Line 74  void CMyTabCtrl::SetRectangle(void) Line 76  void CMyTabCtrl::SetRectangle(void)
76          for (int i=1; i<m_numTabs; i++) {          for (int i=1; i<m_numTabs; i++) {
77                  m_tabs[i]->SetWindowPos(&wndTop,nX,nY,nXc,nYc,SWP_HIDEWINDOW);                  m_tabs[i]->SetWindowPos(&wndTop,nX,nY,nXc,nYc,SWP_HIDEWINDOW);
78          }          }
   
79  }  }
80  void CMyTabCtrl::OnLButtonDown(UINT nFlags, CPoint point)  void CMyTabCtrl::OnLButtonDown(UINT nFlags, CPoint point)
81  {  {
82          CTabCtrl::OnLButtonDown(nFlags,point);          CTabCtrl::OnLButtonDown(nFlags,point);
83    
84            ChangeFocus();
85    }
86    
87    
88    
89    void CMyTabCtrl::ChangeFocus(void)
90    {
91          if (m_tabCurrent != GetCurFocus()) {          if (m_tabCurrent != GetCurFocus()) {
92                  m_tabs[m_tabCurrent]->ShowWindow(SW_HIDE);                  m_tabs[m_tabCurrent]->ShowWindow(SW_HIDE);
93                  m_tabCurrent = GetCurFocus();                  m_tabCurrent = GetCurFocus();
# Line 87  void CMyTabCtrl::OnLButtonDown(UINT nFla Line 95  void CMyTabCtrl::OnLButtonDown(UINT nFla
95                  m_tabs[m_tabCurrent]->SetFocus();                  m_tabs[m_tabCurrent]->SetFocus();
96          }          }
97  }  }
   
   

Legend:
Removed from v.9  
changed lines
  Added in v.12

  ViewVC Help
Powered by ViewVC 1.1.20