Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

tool tips

Intel_C_Intel
Employee
1,214 Views
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
0 Kudos
5 Replies
Jugoslav_Dujic
Valued Contributor II
1,214 Views
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
0 Kudos
Intel_C_Intel
Employee
1,214 Views
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?
0 Kudos
Jugoslav_Dujic
Valued Contributor II
1,214 Views
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
0 Kudos
Intel_C_Intel
Employee
1,214 Views
was that the reason why first error occured? i mean my compiler version (that is cvf 6.1).

ercan
0 Kudos
Jugoslav_Dujic
Valued Contributor II
1,214 Views
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
0 Kudos
Reply