Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set/Reset Icon & Text to "OK" button
#12
This is an integrated example to use dialog buttons with text & images :

Function Dialog_Button_Text
Code:
Copy      Help
;www.quickmacros.com/forum/viewtopic.php?p=31473

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 195 69 "Dialog"
;3 Button 0x54032000 0x0 18 7 48 14 "Reset"
;1 Button 0x54030001 0x4 65 47 48 14 "OK"
;2 Button 0x54034040 0x4 139 46 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040308 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret

#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,__ImageList- t_il.Create("$qm$\copy.ico[]$qm$\paste.ico")
,DT_SetButtonIcon hDlg t_il "1=0 2=1"
,case WM_DESTROY
,case WM_COMMAND goto messages2

ret
;messages2
sel wParam
,case 3
,DT_SetButtonIcon hDlg t_il "1=1 2=0"
(`c);,www.quickmacros.com/forum/viewtopic.php?p=21390

I cannot understand why in the case of "messages2" change of buttons (at execution time) it was necessary to use InvalidateRect to fix the display. Any idea or advice is - as always - welcome.


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)