/[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 31 by torben, Sun Sep 3 10:10:19 2006 UTC
# Line 1  Line 1 
1  // MyTabCtrl.cpp : implementation file  /*
2  //   * Developed by Torben H. Nielsen
3     */
4    
5  #include "stdafx.h"  #include "stdafx.h"
6  #include "h6-udlånssystem.h"  #include "h6-udlånssystem.h"
7  #include "MyTabCtrl.h"  #include "MyTabCtrl.h"
8  #include ".\mytabctrl.h"  #include ".\mytabctrl.h"
9    
10    #include "CommonStorage.h"
11  #include "SearchDialog.h"  #include "SearchDialog.h"
12  #include "AdminDialog.h"  #include "AdminDialog.h"
13  #include "ResultDialog.h"  #include "ResultDialog.h"
# Line 54  void CMyTabCtrl::Init(void) Line 56  void CMyTabCtrl::Init(void)
56          m_tabs[1]->ShowWindow(SW_HIDE);          m_tabs[1]->ShowWindow(SW_HIDE);
57          m_tabs[2]->ShowWindow(SW_HIDE);          m_tabs[2]->ShowWindow(SW_HIDE);
58          SetRectangle();          SetRectangle();
59            
60            CommonStorage::Instance()->setTabCtrl(this);
61  }  }
62    
63  void CMyTabCtrl::SetRectangle(void)  void CMyTabCtrl::SetRectangle(void)
# Line 74  void CMyTabCtrl::SetRectangle(void) Line 77  void CMyTabCtrl::SetRectangle(void)
77          for (int i=1; i<m_numTabs; i++) {          for (int i=1; i<m_numTabs; i++) {
78                  m_tabs[i]->SetWindowPos(&wndTop,nX,nY,nXc,nYc,SWP_HIDEWINDOW);                  m_tabs[i]->SetWindowPos(&wndTop,nX,nY,nXc,nYc,SWP_HIDEWINDOW);
79          }          }
   
80  }  }
81  void CMyTabCtrl::OnLButtonDown(UINT nFlags, CPoint point)  void CMyTabCtrl::OnLButtonDown(UINT nFlags, CPoint point)
82  {  {
83          CTabCtrl::OnLButtonDown(nFlags,point);          CTabCtrl::OnLButtonDown(nFlags,point);
84    
85            ChangeFocus();
86    }
87    
88    
89    
90    void CMyTabCtrl::ChangeFocus(void)
91    {
92          if (m_tabCurrent != GetCurFocus()) {          if (m_tabCurrent != GetCurFocus()) {
93                  m_tabs[m_tabCurrent]->ShowWindow(SW_HIDE);                  m_tabs[m_tabCurrent]->ShowWindow(SW_HIDE);
94                  m_tabCurrent = GetCurFocus();                  m_tabCurrent = GetCurFocus();
# Line 87  void CMyTabCtrl::OnLButtonDown(UINT nFla Line 96  void CMyTabCtrl::OnLButtonDown(UINT nFla
96                  m_tabs[m_tabCurrent]->SetFocus();                  m_tabs[m_tabCurrent]->SetFocus();
97          }          }
98  }  }
   
   

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

  ViewVC Help
Powered by ViewVC 1.1.20