Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPTabClientWnd  - How to tell if ..?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTabClientWnd - How to tell if ..?

 Post Reply Post Reply
Author
Message
Hazelnut View Drop Down
Groupie
Groupie
Avatar

Joined: 22 July 2005
Location: United States
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hazelnut Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabClientWnd - How to tell if ..?
    Posted: 15 August 2005 at 6:15pm

Hi All,

How can you tell when a tab on a CXTPTabClientWnd has been selected? In other words, I need to find the active frame based on which tab is selected WHEN the tab is changed but NOT when I manually check for it.  I guess I want to know if there is a way to get notified when a tab is selected. The only message I see from the control is WM_XTP_PRETRANSLATEMOUSEMSG but that doesn't notify me if a tab is changed.

Thanks!

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 August 2005 at 2:36am

I think you don't need "tab selected" event because user can press Ctrl+Tab to change active MDI instead of using mouse.

 

You need WM_MDIACTIVATE event:

1. Override CXTPTabClientWnd, add message map

2. add ON_MESSAGE(WM_MDIACTIVATE, OnMDIActivate)

3.

LRESULT CMyTabClientWnd::OnMDIActivate(WPARAM wParam, LPARAM lParam)

  // do  stuff.

  return CXTPTabClientWnd::OnMDIActivate(wParam, lParam);

}

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Hazelnut View Drop Down
Groupie
Groupie
Avatar

Joined: 22 July 2005
Location: United States
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hazelnut Quote  Post ReplyReply Direct Link To This Post Posted: 16 August 2005 at 10:46am

Thanks again Oleg, worked like a charm!

class CMyTabClientWnd : public CXTPTabClientWnd

{

public:

CMyTabClientWnd() {}

virtual ~CMyTabClientWnd() {}

//{{AFX_VIRTUAL(CMyTabClientWnd)

//}}AFX_VIRTUAL

protected:

//{{AFX_MSG(CMyTabClientWnd)

afx_msg LRESULT CMyTabClientWnd::OnMDIActivate(WPARAM wParam, LPARAM lParam);

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

/// CPP...

BEGIN_MESSAGE_MAP(CMyTabClientWnd, CXTPTabClientWnd)

//{{AFX_MSG_MAP(CMyTabClientWnd)

ON_MESSAGE(WM_MDIACTIVATE, OnMDIActivate)

//}}AFX_MSG_MAP

END_MESSAGE_MAP()

LRESULT CMyTabClientWnd::OnMDIActivate(WPARAM wParam, LPARAM lParam)

{

   TRACE("Tab Activated\n");

   return CXTPTabClientWnd::OnMDIActivate(wParam, lParam);

}



Edited by Hazelnut
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2005 at 7:40am
Glad to help :)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.