The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set/Change Dialog Image
#1
I know the basics of displaying an image in a dialog, but Is it possible to make a button in the dialog or an outside macro change the path of the specified image so that the image will change?

Function dialog_image
Trigger F12     Help - how to add the trigger to the macro
Code:
Copy      Help
;\Dialog_Editor

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 248 152 "Set Image"
;3 Static 0x5400000E 0x0 16 16 96 96 ""
;4 Static 0x5400000E 0x4 136 16 96 96 ""
;7 Button 0x54032000 0x0 12 128 48 14 "Set 1"
;8 Button 0x54032000 0x0 68 128 48 14 "Set2"
;9 Button 0x54032000 0x0 132 128 48 14 "Set 1"
;10 Button 0x54032000 0x0 188 128 48 14 "Set2"
;5 Button 0x54020007 0x0 8 4 114 117 ""
;6 Button 0x54020007 0x0 128 4 112 117 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040500 "*" "" "" ""

str controls = "3 4"
str sb3 sb4
sb3 = "$desktop$\img\1.png"
sb4 = "$desktop$\img\2.png"
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 7
,out "Change to img\2"

,case 8
,out "Change to img\1"

,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)