Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Context Help...Help?
#1
How does the context help work in a dialog?

Example?

Thanks,
jimmy Vig
#2
What type of context help? F1, title bar button, tooltips?
#3
The Title bar ? button.
#4
What type of action when you click the ? button?
1. When you click the button, then click a control or list item, it shows a tooltip for it.
2. Simply show a message box, or a topic in a help file, or function help in QM tips pane.
#5
Well...

Both.
#6
Use this when you need to display help for whole dialog. This is the simple case.

Function dlg_context_help
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("dlg_context_help" &dlg_context_help 0)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x400 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2030108 "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
,
,case WM_SYSCOMMAND
,sel wParam&0xfff0
,,case SC_CONTEXTHELP
,,mes "help"
,,ret 1
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1

-----------------------------

Use this when you need to display help for controls.

Normally you would create a chm file with Html Help Workshop or some other program, add there a text file with all the tooltips, and use HtmlHelp with HH_DISPLAY_TEXT_POPUP. But you can use some simpler way to display help, for example in status bar or static control.

Function dlg_context_help2
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3 4"
str c3Che lb4
if(!ShowDialog("dlg_context_help2" &dlg_context_help2 &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x400 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Button 0x54012003 0x0 12 16 48 12 "Check"
;4 ListBox 0x54230101 0x200 10 34 96 48 ""
;5 Static 0x54000000 0x0 8 92 212 22 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030108 "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
,
,case WM_HELP
,HELPINFO& h=+lParam
,str s
,sel h.iCtrlId
,,case 3 s="this is a check box"
,,case 4 s="this is a list box"
,s.setwintext(id(5 hDlg))
,
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#7
Thanks. Looks good!


Forum Jump:


Users browsing this thread: 1 Guest(s)