09-04-2014, 09:23 AM
If button text contains &, next character is underlined and you can use Alt+that character.
It also can be used in Static controls to set focus to the next control in Z order.
Function Dialog150
It also can be used in Static controls to set focus to the next control in Z order.
Function Dialog150
\Dialog_Editor
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x54032000 0x0 8 8 64 14 "&Button (Alt+B)"
;4 Button 0x54032000 0x0 8 28 64 14 "Butto&n (Alt+N)"
;5 Static 0x54000000 0x0 8 48 64 12 "Te&xt (Alt+X)"
;6 Edit 0x54030080 0x200 80 48 96 12 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040201 "*" "" "" ""
str controls = "6"
str e6
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 3 ;;&Button (Alt+B)
,out 3
,
,case 4 ;;Butto&n (Alt+N)
,out 4
ret 1