Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get an existing variable to show in text when using newitem
#9
well i thought it would work but i didnt realise the new item would me a macros not a function i am using it in a dialogue like this

Code:
Copy      Help
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x190 0 0 90 95 "PLEASE PICK ONE"
;1 Button 0x54030001 0x4 0 82 90 13 "CLICK HERE TO SET"
;3 Button 0x54012003 0x0 0 3 98 15 ""
;4 Button 0x54012003 0x0 0 20 108 23 ""
;5 Button 0x54012003 0x0 0 46 108 15 ""
;6 Button 0x54012003 0x0 0 64 108 15 ""
;10 Static 0x54000010 0x20000 0 44 95 2 ""
;9 Static 0x54000010 0x20000 2 18 95 1 ""
;8 Static 0x54000010 0x20000 0 62 95 1 ""
;END DIALOG
;DIALOG EDITOR: "" 0x202000B "" ""

str controls = "3 4 5 6"
str c3Che c4Che c5Che c6Che
if(!ShowDialog("RPC_CPUD" &RPC_CPUD &controls)) ret
if(c3Che=1)
,newitem "RPC_CPU" "0.001" "" ""
if(c4Che=1)
,newitem "RPC_CPU" "0.002" "" ""
if(c5Che=1)
,newitem "RPC_CPU" "0.005" "" ""
if(c6Che=1)
,newitem "RPC_CPU" "0.009" "" ""
ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)

sel message
,case WM_INITDIALOG
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1

and want it to replace the exsisting text in the RPC_CPU function with the text specified in the dialogue or i was originally going to make it delete the RPC_CPU at the beging of the dialogue and replace it with newitem until i realised newitem was a macros not function Sad


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)