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

tool tips on buttons ?

presser
Principiante
1.085 Visualizações
Under this topic I found a message from D.Graham, posted Nov. 2001.
Because I'm also very interested in tool tips on dialog box items, I tried to transfer the attached software somehow in my QuickWin application, but without success; don't really understand dialog procedures in Win32. Is there any possibility for me to get tips on buttons too?
0 Kudos
5 Respostas
Jugoslav_Dujic
Contribuidor valorado II
1.085 Visualizações
Your attachment didn't stick, so it's hard to tell whether you're trying it on a toolbar or in a dialog.

Attached (hopefully ;-)) is modified QWToolbar sample which displays tooltips on toolbar buttons. TBSTYLE_TOOLTIPS should be added in CreateToolbarEx. When the tooltip is about to be displayed, it sends a WM_NOTIFY/TTN_GETDISPINFO (a.k.a. TTN_NEEDTEXT) message; the window procedure should either
- fill in hInst member and put ID of a string resource from the string table into lpszText member
- put address of a C string into lpszText member.
The sample illustrates the first technique; a string table is added with string IDs identical to button IDs.

If you want to do it in a dialog, I'd suggest not. Tooltips are used only for bitmapped buttons as in toolbar; in dialogs, they distract user's attention. The preferred way is to provide "context help" button and use tooltip help from help file. See xflogm (be sure you read the reference page as well). Sorry, can't help much in writing help files -- I used a 3rd party tool (HelpScribble) to make one; there's free Help Workshop from Microsoft as well. See also green text related with CONTEXTID switch -- instead of writing a big SELECT CASE, you can automate the task by including resource.hm into help workshop project (cf. string table/select case approaches above).

Jugoslav
---
Sigh, attachment won't stick again -- can someone fix that bug please? It behaves according to Murphy's Law -- whenever you announce the attachment, "Attach files and post message" button dies. Luckily, I got into habit of making a backup of the text ;-)
Jugoslav_Dujic
Contribuidor valorado II
1.085 Visualizações
...here it is
presser
Principiante
1.085 Visualizações
Thank you very much for your reply. I actually tried to attach tool tips in a dialog, but I appreciate your suggestion and provided "context help" via F1-key and use tooltip from help file using the Workshop from Microsoft. There still arises one problem: I can't get consecutive help for Static Controls, even though with "notify", what enables text writing. I tried to manipulae XFLOGM.f90, because callbacksize is set to 1 for the class = CLS_STATIC but without success. Can you help me in this point? Thanks again.
W.Presser
Jugoslav_Dujic
Contribuidor valorado II
1.085 Visualizações
Wolfgang, I see that popup help for static controls works in my DialogTest sample. However, I don't think it can be invoked via F1 key -- it requires that the control has focus, and AFAIK static controls cannot have focus. It does work when "context help" button is used from dialog caption and the control is clicked. Also, I think the static control must have an ID other than IDC_STATIC.

Jugoslav
pcurtis
Principiante
1.085 Visualizações
I seem to recall posting this in reply to a similar query within the last 2 weeks or so, but here it is again.
Responder