Print Page | Close Window

ShowBalloonTip not working CXTPControlComboBox

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=14443
Printed Date: 22 June 2025 at 12:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ShowBalloonTip not working CXTPControlComboBox
Posted By: xafier
Subject: ShowBalloonTip not working CXTPControlComboBox
Date 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);



Replies:
Posted By: Oleg
Date 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


Posted By: znakeeye
Date 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/


Posted By: xafier
Date 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.


Posted By: Oleg
Date 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


Posted By: znakeeye
Date Posted: 09 June 2009 at 5:16am
I can live with that, but please make sure to add ASSERTs for incompatible EDIT-styles!
 
http://forum.codejock.com/forum_posts.asp?TID=14109&KW=ES%5FNUMBER - http://forum.codejock.com/forum_posts.asp?TID=14109&KW=ES%5FNUMBER


-------------
PokerMemento - http://www.pokermemento.com/


Posted By: znakeeye
Date 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/


Posted By: Oleg
Date Posted: 15 June 2009 at 3:04am
Hi,
 
from CXTPControlComboBoxEditCtrl


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net