Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
884 B

  1. // HMTabCtrl.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "HMTabView.h"
  5. #include "HMTabCtrl.h"
  6. #include "HMTabViewCtl.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CHMTabCtrl
  14. CHMTabCtrl::CHMTabCtrl()
  15. {
  16. }
  17. CHMTabCtrl::~CHMTabCtrl()
  18. {
  19. }
  20. BEGIN_MESSAGE_MAP(CHMTabCtrl, CTabCtrl)
  21. //{{AFX_MSG_MAP(CHMTabCtrl)
  22. ON_NOTIFY_REFLECT(TCN_SELCHANGE, OnSelchange)
  23. //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CHMTabCtrl message handlers
  27. void CHMTabCtrl::OnSelchange(NMHDR* pNMHDR, LRESULT* pResult)
  28. {
  29. int iItem = GetCurSel();
  30. CHMTabViewCtrl* pCtrl = (CHMTabViewCtrl*)GetParent();
  31. if( pCtrl == NULL )
  32. {
  33. return;
  34. }
  35. pCtrl->OnSelChangeTabs(iItem);
  36. *pResult = 0;
  37. }