Strange behavior with TWhatsThis

This section is for programmers. Please use it for all discussons on interfacing help with your applications and related subjects.

Moderators: Alexander Halser, Michael Schwarzl

Post Reply
TonyNiemann
Posts: 17
Joined: Thu Jan 01, 2004 8:54 pm

Strange behavior with TWhatsThis

Unread post by TonyNiemann »

I am getting strange behavior with the TWhatsThis component. When I activate it I get the ? icon, then when I click on a control it launches the help file (and can't find the context) and then shows the pop-up box. It didn't use to launch help, I don't know how long it's been doing it but the only change I'm aware of is upgrading the project from D5 to D7.

Any suggestions would be appreciated!

Tony
TonyNiemann
Posts: 17
Joined: Thu Jan 01, 2004 8:54 pm

More info...

Unread post by TonyNiemann »

After some debugging I traced the problem to TWhatsThis.InvokeHelp

Near the end of the the following commands are issued:

if (X <> 0) and (Y <> 0) then
Application.HelpCommand(HELP_SETPOPUP_POS, makelong(x,y));
Application.HelpCommand(HELP_CONTEXTPOPUP, HC);

The first HelpCommand is launching the windows help program. The second is displaying the pop-up.

:? Help...

Tony
TonyNiemann
Posts: 17
Joined: Thu Jan 01, 2004 8:54 pm

Unread post by TonyNiemann »

Disregard this request, it is a bug in D7. I was able to work around it by intercepting the help call and processing it myself rather than letting the vcl do it.

Thanks,
Tony
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

This is an experience I've often had myself -- I gnaw on a problem for days, look at all the possible solutions and finding nothing I finally post a question somewhere. Usually an obvious answer then presents itself to me, generally within a few minutes of posting. Sort of a positive corollary to Murphy's Law, I suppose... 8)

Happy New Year! :D
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply