Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - ShowBalloonTip not working CXTPControlComboBox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ShowBalloonTip not working CXTPControlComboBox

 Post Reply Post Reply
Author
Message
xafier View Drop Down
Newbie
Newbie


Joined: 02 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote xafier Quote  Post ReplyReply Direct Link To This Post Topic: ShowBalloonTip not working CXTPControlComboBox
    Posted: 03 June 2009 at 10:41am
I have a CXTPControlComboBox on my ribbon, if the user enters an invalid value then I wish to display a balloon tip telling them the problem.

I have tried the following, but the balloon tip is not displayed:

NMXTPCONTROL* tagNMCONTROL = (NMXTPCONTROL*)pNMHDR;
CXTPControlComboBox* pControl = (CXTPControlComboBox*)tagNMCONTROL->pControl;
........
if(bError == true)
    pControl->GetEditCtrl()->ShowBalloonTip(L"Error", L"Description", TTI_ERROR);
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: 04 June 2009 at 2:04am
Hi,
 
Edit part of ComboBox is actually RichEdit. Seems Microsoft didn't implement EM_SHOWBALLOONTIP  for RichEdit :( 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2009 at 2:59am
Just like I mentioned before; it is absolutely crucial that you let the programmer choose between Edit and RichEdit! I've pinpointed other problems too. Such as ES_PASSWORD, ES_NUMBER...
 
I hope you make this configurable in 13.1.
PokerMemento - http://www.pokermemento.com/
Back to Top
xafier View Drop Down
Newbie
Newbie


Joined: 02 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote xafier Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2009 at 3:51am
I agree with znakeeye, it would be good if it was CEdit instead of richedit, then the balloon tips would work, which are very useful, and also allow easily to limit the user to numbers and such without having to drastically override the classes and do it all manually.

Guess I'll have to try and find a long way round to solving the problem of notifying the user of a problem.
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: 04 June 2009 at 8:17am
Hi,
 
It can be configured with custom Edit. See CControlComboBoxEditEx from Samples\CommandBars\CustomThemes\CustomControls.cpp.
 
override edit and add
 
BOOL CMyCommandBarEditCtrl::CreateEdit(DWORD dwStyle, CWnd* pParentWnd)
{
 return CEdit::Create(dwStyle, CRect(0, 0, 0, 0), pParentWnd, 0);
}
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 09 June 2009 at 5:16am
I can live with that, but please make sure to add ASSERTs for incompatible EDIT-styles!
 
PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2009 at 8:05pm
Looked at the sample. I'm confused. From which class should you derive CMyCommandBarEditCtrl?
PokerMemento - http://www.pokermemento.com/
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: 15 June 2009 at 3:04am
Hi,
 
from CXTPControlComboBoxEditCtrl
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.078 seconds.