Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Clipper Visual-Objects > Problem with to...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 11342 of 11560
Post > Topic >>

Problem with tooltip

by =?iso-8859-1?Q?E=AE!k_\\/!sser?= <nospam@[EMAIL PROTECTED] > Apr 23, 2008 at 03:16 PM

Hi all,
I have a problem with tooltips.
On a ChildAppWindow a draw a schedule. The schedule shows the hirers of a 
s****ts hall. Form left to right the hours of a day, from top to bottom the

days of a week. The hirers are reprecented by different colors, for this 
RectangleObjects are drawn.
Recently I added a tooltip at moveover showing the name of the hirer.
Problem is that on about the lower 1/3 this does not work, no tooltip is 
shown. HitTest returns true however.
As all drawing is relative to the size of the window, I can draw it in any

size. Strange thing is that If I resize my screen to a smaller height, it 
all works fine.
Does somebody has any clue where to look for ?


Tia,

Erik


The Tooltip is initialized in the postinit like this:

hTooltip := CreateWindowEx( WS_EX_TOPMOST,;
      String2Psz(TOOLTIPS_CLASS),;
      NULL_PTR,;
      _OR(WS_POPUP, TTS_NOPREFIX, TTS_ALWAYSTIP , TTS_BALLOON),;
      CW_USEDEFAULT,;
      CW_USEDEFAULT,;
      CW_USEDEFAULT,;
      CW_USEDEFAULT,;
      SELF:Handle(),;
      NULL_PTR,;
      _GetInst(),;
      NULL_PTR)

SELF:AddToolTip( SELF:Handle(),4711,  "Test" )
 SendMessage( hTooltip,TTM_ACTIVATE, 1, 0)
 SendMessage(hTooltip, TTM_SETMAXTIPWIDTH, 0, 200)

 SendMessage(hTooltip, TTM_SETDELAYTIME, TTDT_AUTOPOP, 1500)
 SendMessage(hTooltip, TTM_SETDELAYTIME, TTDT_RESHOW, 1)




METHOD AddToolTip(hW AS PTR, nID AS INT, cT AS STRING) AS VOID PASCAL
CLASS 
Color_Rooster_Window

  LOCAL rc IS _winRECT
 IF hTooltip == NULL_PTR
  //? "Error"
  RETURN
 ENDIF

 GetClientRect(hW, @[EMAIL PROTECTED]
)
 ti.cbSize := _SIZEOF(_winTOOLINFO)
 ti.uFlags := TTF_SUBCLASS
 ti.hwnd := hW
 ti.hinst := _GetInst()
 ti.uId := nID
 ti.rect.left := rc.left
 ti.rect.top := rc.top
 ti.rect.right := rc.right
 ti.rect.bottom := rc.bottom
 ti.lpszText := String2Psz("Testdertest") //LPSTR_TEXTCALLBACK
 SendMessage(hTooltip, TTM_ADDTOOL, 0L, LONG(_CAST, @[EMAIL PROTECTED]
))
 RETURN

And this is the MouseMove Method
METHOD MouseMove(oMouseEvent) CLASS Color_Rooster_Window
   LOCAL nButtonID AS INT
   LOCAL xPos, yPos AS INT
   LOCAL cAllText   AS STRING

   nButtonID := IIF(oMouseEvent == NULL_OBJECT, 0, oMouseEvent:ButtonID)

   SUPER:MouseMove(oMouseEvent)

   xPos := oMouseEvent:Position:x
   yPos := oMouseEvent:Position:y
      IF SELF:Hittest( xPos, yPos, @[EMAIL PROTECTED]
  )
          //  returns true, cAllText contains a name so everything is fine
          //  but the tooltip is not shown on the lower part of the screen
          ti.lpszText := String2Psz( cAllText  )
         SendMessage(hTooltip, TTM_ADDTOOL, 0L, LONG(_CAST, @[EMAIL PROTECTED]
))
         SendMessage(hTooltip, TTM_UPDATETIPTEXT, 0L, LONG(_CAST, @[EMAIL PROTECTED]
))
      ELSE
         ti.lpszText := String2Psz( "")
         SendMessage(hTooltip, TTM_DELTOOL, 0L, LONG(_CAST, @[EMAIL PROTECTED]
))
       ENDIF

   RETURN NIL
 




 7 Posts in Topic:
Problem with tooltip
=?iso-8859-1?Q?E=AE!k_\\/  2008-04-23 15:16:26 
Re: Problem with tooltip
"Dave Francis"   2008-04-23 16:54:03 
Re: Problem with tooltip
=?iso-8859-1?Q?E=AE!k_\\/  2008-04-23 18:10:40 
Re: Problem with tooltip
"Dave Francis"   2008-04-23 17:23:36 
Re: Problem with tooltip
"Dave Francis"   2008-04-25 14:17:35 
Re: Problem with tooltip
=?iso-8859-1?Q?E=AE!k_\\/  2008-04-25 16:56:23 
Re: Problem with tooltip
=?iso-8859-1?Q?E=AE!k_\\/  2008-04-25 19:24:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 3:10:58 CDT 2008.