Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPControlPopup OnMouseHover
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPControlPopup OnMouseHover

 Post Reply Post Reply
Author
Message
lion View Drop Down
Groupie
Groupie


Joined: 04 March 2008
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote lion Quote  Post ReplyReply Direct Link To This Post Topic: CXTPControlPopup OnMouseHover
    Posted: 11 February 2009 at 6:19am
Hi,

all I want is handle the onMouseHover Event for a CXTPControlPopup.

CXTPControlPopup* pCtrlPopup = CXTPControlPopup::CreateControlPopup(xtpControlSplitButtonPopup);

1. I don't know how to catch that event in my mainframe.

2. Another way of doing it: I tried to inherit from CXTPControlPopup -> MyControlPopup
MyControlPopup* pMyCtrlPopup = (MyControlPopup*)MyControlPopup::CreateControlPopup(xtpControlSplitButtonPopup);
but then the OnMouseHover Eventhandler is not called, or

3. I can not set the controltype to "xtpControlSplitButtonPopup", when using
MyControlPopup* pMyCtrlPopup = new MyControlPopup();

what would be the best/easiest way, to catch the OnMouseHover event for the CXTPControlPopup-xtpControlSplitButtonPopup, in order so set a dynamic tooltip ?

Thanx in advance
Cheers Bjoern

Back to Top
lion View Drop Down
Groupie
Groupie


Joined: 04 March 2008
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote lion Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2009 at 9:21am
ok, i found a way: overriding "CXTPControlPopup* CXTPControlPopup::CreateControlPopup( XTPControlType controlType )"did it now...

but:
how do I make the nee tooltip onMouseHover() appear right away?
I implemented:

void CXTPControlPopupUndo::OnMouseHover() {
    this->SetTooltip( GetMyDynString() );
}

but the string only appears once I leaf the control and hover over it again... that is: the tooltip is always the one before...
what function do i need to call to make my string visible as a tooltip immediately ?

Thanx for some help
Cheers Björn
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 12 February 2009 at 4:51am
Hi,
 
don't change OnMouseHover - Override  GetTooltip and return your dynamic tip.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
lion View Drop Down
Groupie
Groupie


Joined: 04 March 2008
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote lion Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2009 at 7:24am
yea, thanx! Thats it... Now it works fine.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.047 seconds.