Click to See Complete Forum and Search --> : How to Use Edit_ShowBalloonTip Api


archhabra
June 15th, 2009, 02:29 AM
Hi,

I have to use this API from file commctrl.h in my code but i am not able to use it. My project already have the manifest file specifying Comclt32.dll version 6.0.Also i did

INITCOMMONCONTROLSEX iccx = { sizeof(INITCOMMONCONTROLSEX), ICC_BAR_CLASSES };
BOOL bRet = ::InitCommonControlsEx(&iccx);

in the constructor of my class where i am going to use it. But still i am getting the same error.

error C3861: 'Edit_ShowBalloonTip': identifier not found, even with argument-dependent lookup

Anyone having Idea how to use this.

Regards
Arti

hoxsiew
June 15th, 2009, 09:09 AM
I assume you're using an EDIT control and want to show the associated balloon tip? There is no API named Edit_ShowBalloonTip that I'm aware of. You can force a balloon tip on an edit control by sending it the EM_SHOWBALLOONTIP message:


HWND hEdit1; //set this to your edit control
wchar_t buf[100];
EDITBALLOONTIP bt;

bt.cbStruct=sizeof(EDITBALLOONTIP);
bt.pszTitle=L"Error";
swprintf_s(buf,100,L"The character %c is not too be used in this control.",L'&');
bt.pszText=buf;
bt.ttiIcon=TTI_ERROR;
::SendMessage(hEdit1,EM_SHOWBALLOONTIP,0,(LPARAM)&bt);
::MessageBeep(0xFFFFFFFF);


Edit: I was wrong: there is a wrapper for Edit_ShowBalloonTip() in Commctrl.h. Make sure you've included that header.

archhabra
June 16th, 2009, 02:15 AM
Hi,

I am including that file commctrl.h in my header but still i am getting the same error:

'Edit_ShowBalloonTip': identifier not found, even with argument-dependent lookup

so not able to build the code.

Regards
Arti

carl666
June 16th, 2009, 08:06 AM
There is no API named Edit_ShowBalloonTip that I'm aware of. .

???
Of course there is.
See MSDN : It's 8 years old and well-known in Win32...

hoxsiew
June 16th, 2009, 11:57 AM
???
Of course there is.
See MSDN : It's 8 years old and well-known in Win32...

Read my WHOLE message (including the EDIT part).

hoxsiew
June 16th, 2009, 12:03 PM
Hi,

I am including that file commctrl.h in my header but still i am getting the same error:

'Edit_ShowBalloonTip': identifier not found, even with argument-dependent lookup

so not able to build the code.

Regards
Arti

I have no idea why this would be the case then. Perhaps a macro issue. I'm looking at commctrl.h and see: "#if (_WIN32_WINNT >= 0x501)" before the definition. Maybe a manifest issue?