- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
i have tooltips example on cvf cd. i am trying to do sth else. but the main idea is the same as tooltips example. i just want to add toolbar. however i couldnt manage to display button tips as i put the mouse over it. what might be the problem? i also wrote a promt for it. but nothing changed. here is the code.
thank you
i have tooltips example on cvf cd. i am trying to do sth else. but the main idea is the same as tooltips example. i just want to add toolbar. however i couldnt manage to display button tips as i put the mouse over it. what might be the problem? i also wrote a promt for it. but nothing changed. here is the code.
thank you
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's nothing obviously wrong with the code. Few thoughts:
- Did you specify TBSTYLE_TOOLTIPS for the toolbar?
- Do you have string table resource embedded within the application, with string IDs identical to toolbar buttons IDs? The sample requires that.
- What happens when you put a breakpoint in if (..%hdr%code.EQ.TTN_NEEDTEXT) block? Is it ever entered? What are return values from functions?
Stylistic note: A bit simpler version, provided that you use string table technique, is to put string ID and hInstance into TOOLTIPTEXT structure instead of loading it yourself:
DI%hInst = g_hInstance
DI%lpszText = wParam
i.e. if you supply hInstance and string ID within lpszText, the tooltip will LoadString for itself -- but that's not the problem with the actual code.
Jugoslav
- Did you specify TBSTYLE_TOOLTIPS for the toolbar?
- Do you have string table resource embedded within the application, with string IDs identical to toolbar buttons IDs? The sample requires that.
- What happens when you put a breakpoint in if (..%hdr%code.EQ.TTN_NEEDTEXT) block? Is it ever entered? What are return values from functions?
Stylistic note: A bit simpler version, provided that you use string table technique, is to put string ID and hInstance into TOOLTIPTEXT structure instead of loading it yourself:
DI%hInst = g_hInstance
DI%lpszText = wParam
i.e. if you supply hInstance and string ID within lpszText, the tooltip will LoadString for itself -- but that's not the problem with the actual code.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
first i have to take a close look into your reply. i used ToolTips example, by Norman Lawrance, from CVF book to check if it works. And it gives the following errors as i run the program. These errors are the same as i run mine.
C:WindowsDesktopCVF_book_exmchap07_tooltipsToolTips.f90(195) : Error: This derived type name has not been declared. [T_NMTTDISPINFO]
type (T_NMTTDISPINFO) lpToolTipText
------^
C:WindowsDesktopCVF_book_exmchap07_tooltipsToolTips.f90(196) : Error: This name does not have a type, and must have an explicit type. [LPTOOLTIPTEXT]
pointer(ptext, lpToolTipText)
---------------^
C:WindowsDesktopCVF_book_exmchap07_tooltipsToolTips.f90(231) : Error: This variable or component must be of a derived or structure type [LPTOOLTIPTEXT]
if(lpToolTipText%hdr%code == TTN_GETDISPINFO ) then
-------------^
C:WindowsDesktopCVF_book_exmchap07_tooltipsToolTips.f90(231) : Error: This is not a field name that is defined in the encompassing structure. [HDR]
if(lpToolTipText%hdr%code == TTN_GETDISPINFO ) then
---------------------------^
Error executing df.exe.
ToolTips.exe - 4 error(s), 0 warning(s)
so what could be the possible reason?
C:WindowsDesktopCVF_book_exmchap07_tooltipsToolTips.f90(195) : Error: This derived type name has not been declared. [T_NMTTDISPINFO]
type (T_NMTTDISPINFO) lpToolTipText
------^
C:WindowsDesktopCVF_book_exmchap07_tooltipsToolTips.f90(196) : Error: This name does not have a type, and must have an explicit type. [LPTOOLTIPTEXT]
pointer(ptext, lpToolTipText)
---------------^
C:WindowsDesktopCVF_book_exmchap07_tooltipsToolTips.f90(231) : Error: This variable or component must be of a derived or structure type [LPTOOLTIPTEXT]
if(lpToolTipText%hdr%code == TTN_GETDISPINFO ) then
-------------^
C:WindowsDesktopCVF_book_exmchap07_tooltipsToolTips.f90(231) : Error: This is not a field name that is defined in the encompassing structure. [HDR]
if(lpToolTipText%hdr%code == TTN_GETDISPINFO ) then
---------------------------^
Error executing df.exe.
ToolTips.exe - 4 error(s), 0 warning(s)
so what could be the possible reason?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Microsoft renamed TOOLTIPTEXT structure to NMTTDISPINFO. My DFWINTY.f90 from CVF 6.6B contains both (so that old codes work). You should either upgrade your compiler or just stick to T_TOOLTIPTEXT instead.
Jugoslav
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
was that the reason why first error occured? i mean my compiler version (that is cvf 6.1).
ercan
ercan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But you didn't write what was the first error exactly? I assumed that you were able to compile it, but tooltips did not show up, thus my first answer.
Since you have 6.1, you cannot upgrade to 6.6 for free -- you have to change the code so that it uses TOOLTIPTEXT instead of NMTTDISPINFO (if I recall correctly, the member names are identical).
Please put some more effort to describe what the problem is and what you're trying to do. "Doesn't work" or similar is not enough for someone to deduce what's going on.
Jugoslav
Since you have 6.1, you cannot upgrade to 6.6 for free -- you have to change the code so that it uses TOOLTIPTEXT instead of NMTTDISPINFO (if I recall correctly, the member names are identical).
Please put some more effort to describe what the problem is and what you're trying to do. "Doesn't work" or similar is not enough for someone to deduce what's going on.
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page