Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » How to enable event of "CExtDynamicBarSite::OnTabPageContainerClickedButton"? Collapse All
Subject Author Date
Gilbert Ahn Mar 6, 2008 - 10:12 PM

Hi.
I modify a code in SDI_DynamicBars.

// MainFrm.h
class CExtDynamicBarSite2 : public CExtDynamicBarSite
{
public:
virtual bool OnTabPageContainerClickedButton (
LONG nHitTest,
bool bButtonPressed,
INT nMouseButton,
UINT nMouseEventFlags
);
};

class CMainFrame
    : public CExtNCW < CFrameWnd >
    , public CExtDynamicBarSite2
{
...
}

// MainFrm.cpp
bool CExtDynamicBarSite2::OnTabPageContainerClickedButton (
LONG nHitTest,
bool bButtonPressed,
INT nMouseButton,
UINT nMouseEventFlags
)
{
return CExtDynamicBarSite::OnTabPageContainerClickedButton(nHitTest,
bButtonPressed,
nMouseButton,
nMouseEventFlags);
}

I thing in anticipation of calling the "CExtDynamicBarSite2::OnTabPageContainerClickedButton". However, Nothing happened.

How to enable event of "CExtDynamicBarSite::OnTabPageContainerClickedButton" in SDI_DynamicBars.

Thank you for read.

Technical Support Mar 14, 2008 - 12:49 PM

When do you expect this method should be invoked? It seems we are misunderstanding each other. This method is invoked when a tab control button in the tab page container is clicked. These buttons are Left Up, Right Down, Help, Close, Tab List, Scroll Home and Scroll End. Would you describe once again what you would like like to implement?

Gilbert Ahn Mar 10, 2008 - 1:54 AM

I already try to that. But, It does not invoked.

Please, share of your project.

And, I uesd ProfUIS 2.82.

///////////// "MainFrm.h" in SDI_DynamicBars
class CMainFrame
    : public CExtNCW < CFrameWnd >
    , public CExtDynamicBarSite
{
...
...
public:
virtual bool OnTabPageContainerClickedButton (
LONG nHitTest,
bool bButtonPressed,
INT nMouseButton,
UINT nMouseEventFlags
);
...
...
};

///////////// "MainFrm.cpp" in SDI_DynamicBars
bool CMainFrame::OnTabPageContainerClickedButton (
LONG nHitTest,
bool bButtonPressed,
INT nMouseButton,
UINT nMouseEventFlags
)
{
return CExtDynamicBarSite::OnTabPageContainerClickedButton(nHitTest,
bButtonPressed,
nMouseButton,
nMouseEventFlags);
}

Technical Support Mar 8, 2008 - 11:12 AM

It is not necessary to create an additional class CExtDynamicBarSite2. You can directly override the OnTabPageContainerClickedButton method in CMainFrame.

bool CMainFrame::OnTabPageContainerClickedButton(
            LONG nHitTest,
            bool bButtonPressed,
            INT nMouseButton,
            UINT nMouseEventFlags
            )
{
            return 
                        CExtDynamicBarSite::OnTabPageContainerClickedButton(nHitTest,
                                   bButtonPressed,
                                   nMouseButton,
                                   nMouseEventFlags
                                   );
}
We tested this and all worked well. The OnTabPageContainerClickedButton method was invoked as designed when we clicked on tab’s buttons.