Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Returning values from function to different dialog controls
#8
Hi Gintaras, thank you kindly, that works, sort of. The text is now being appended and scrolling nicely Smile however it now appends the balance instead of replacing it- it is showing 100200(instead of just 200). Can we have it so the text box replaces the text but the edit box scrolls the text?

Have played around with it, but can't seem to work it out - please can you assist?

Function Hot_Dialog
Code:
Copy      Help
,case WM_APP
,int hwndControl=id(wParam hDlg)
,/SetDlgItemText hDlg wParam F"{lParam%%s}"
,SendMessage hwndControl EM_SETSEL 1000000000 1000000000
,SendMessage hwndControl EM_REPLACESEL 0 F"{lParam%%s}[]"

Macro Hot
Code:
Copy      Help
function hDlg ~toPlay #prog #TotalBalance;;pass variable from dialog that determines which casino we are playing ;;set to 0 by default (i.e. no progression)

//double TotalBalance ;;game balance
//if(!inp(TotalBalance "Enter starting Balance" "Enter Your Balance" "0")) ret ;;prompt for starting balance to be entered
TotalBalance=TotalBalance+100
SendMessage hDlg WM_APP 10 F"{TotalBalance}"
SendMessage hDlg WM_APP 9 "This is the first line"
SendMessage hDlg WM_APP 9 "This should appear below the first line"


Attached Files Image(s)
   


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)