View Issue Details

IDProjectCategoryView StatusLast Update
0001356JEDI VCL00 JVCL Componentspublic2004-03-09 02:47
ReporteranonymousAssigned ToAHUser 
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001356: JvCaptionButton will not show hint on Unicode form (TntForm)
DescriptionWhen using Tnt Unicode Controls http://home.ccci.org/wolbrink/tnt/delphi_unicode_controls.htm

hint is not shown for JvCaptionButton.
Regards,
Vlad Skarzhevskyy
http://mp3bookhelper.sourceforge.net/
Additional InformationThis is my solution
function TJvCaptionButton.HandleNotify(var Msg: TWMNotify): Boolean;
var
  CurPos: TPoint;
  LButtonRect, WindowRect: TRect;
begin
  // if we receive a TTN_GETDISPINFO notification
  // and it is from the tooltip
  Result := ((Msg.NMHdr.Code = TTN_NEEDTEXT) or
             (Msg.NMHdr.Code = TTN_NEEDTEXTW)) and (Msg.NMHdr.hWndFrom = FToolTipHandle);

  if Result and (ShowHint or (ParentShowHint and ParentForm.ShowHint)) then
  begin
    // get cursor position
    GetCursorPos(CurPos);
    GetWindowRect(ParentFormHandle, WindowRect);
    LButtonRect := FButtonRect;
    OffsetRect(LButtonRect, WindowRect.Left, WindowRect.Top);

    // if the mouse is in the area of the button
    if PtInRect(LButtonRect, CurPos) then
    begin
        if (Msg.NMHdr.Code = TTN_NEEDTEXTA) then
        begin
            with PNMTTDispInfo(Msg.NMHdr)^ do
            begin
                // then we return the hint
                lpszText := PChar(FHint);
                hinst := 0;
                uFlags := TTF_IDISHWND;
                hdr.idFrom := ParentFormHandle;
            end
        end
        else
        begin
            with PNMTTDispInfoW(Msg.NMHdr)^ do
            begin
                // then we return the hint
                lpszText := PWideChar(WideString(FHint));
                hinst := 0;
                uFlags := TTF_IDISHWND;
                hdr.idFrom := ParentFormHandle;
            end
        end
    end
    else
      //else we hide the tooltip
      HideToolTip;
  end;
end;
TagsNo tags attached.

Activities

anonymous

2004-02-23 02:45

viewer   ~0003002

Thanks. I fixed it.

AHUser

2004-02-23 02:47

developer   ~0003003

Fixed

Issue History

Date Modified Username Field Change
2004-02-22 16:37 anonymous New Issue
2004-02-23 02:45 anonymous Note Added: 0003002
2004-02-23 02:47 AHUser Status new => resolved
2004-02-23 02:47 AHUser Resolution open => fixed
2004-02-23 02:47 AHUser Assigned To => AHUser
2004-02-23 02:47 AHUser Note Added: 0003003
2004-03-09 02:47 user72 Status resolved => closed