Erik,
From the code you supplied, I don't have the same problem. ChildAppWindow
and resizing.
But I'm not sure how you are declaring ti structure? Would it help if I
just
sent you my small AEF so you could look for the differences?
Best Regards,
Dave Francis
"Dave Francis" <dave.is.a.spam.free.zone@[EMAIL PROTECTED]
> wrote in message
news:67964aF2l2bpoU1@[EMAIL PROTECTED]
> Erik,
>
>> I am sorry, I do not know where you are talking about.Or it must be
>> forgotten very very deeply.
>
> I must be talking rubbish as usual :o) - it's certainly not that problem
> if it's a childappwin. I'll play around with your code and see what
> happens. (It's a long time since I used draw objects - I always draw on
> custom controls). I'll get back.
>
> Talk soon,
>
> Dave
>
> "EŽ!k \/!sser" <nospam@[EMAIL PROTECTED]
> wrote in message
> news:6795c1F2mehe1U1@[EMAIL PROTECTED]
>> Hi Dave!
>> I am sorry, I do not know where you are talking about.Or it must be
>> forgotten very very deeply.
>> In this case I do not think this is the problem
>> a) it is not a datawindow but a ChildAppWindow
>> b) the Y coordinate is found by the MouseEvent and correct. If I add a
>> qout(), the correct Hirer is displayed, but still no Tooltip
>>
>> xPos := oMouseEvent:Position:x
>> yPos := oMouseEvent:Position:y
>> IF SELF:Hittest( xPos, yPos, @[EMAIL PROTECTED]
)
>> ? cAllText // correct information quoted
>> ti.lpszText := String2Psz( cAllText )
>> SendMessage(hTooltip, TTM_ADDTOOL, 0L, LONG(_CAST, @[EMAIL PROTECTED]
))
>> SendMessage(hTooltip, TTM_UPDATETIPTEXT, 0L, LONG(_CAST, @[EMAIL PROTECTED]
))
>> ELSE
>>
>> Any other suggestions?
>>
>> Erik
>>
>>
>>
>> IT is
>> "Dave Francis" <dave.is.a.spam.free.zone@[EMAIL PROTECTED]
> schreef in
bericht
>> news:6794ctF2lvselU1@[EMAIL PROTECTED]
>>> Hi Erik,
>>>
>>> This must be that old problem of finding the Y coordinate on a resized
>>> datawindow? I bet you solved this eons ago but have since forgotten
>>> about the problem?
>>>
>>> HTH
>>>
>>> Dave Francis
>>>
>>>
>>> "EŽ!k \/!sser" <nospam@[EMAIL PROTECTED]
> wrote in message
>>> news:678r5bF2nspf6U1@[EMAIL PROTECTED]
>>>> 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
>>>>
>>>>
>>>
>>>
>>
>
>


|