Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clear a dialogue control using SendKeysToWindow
#1
I am in need to clear a dialogue control, under certain conditions. I guess I would may use of a statement of type :
Quote: SendKeysToWindow id(5 hDlg) key(...)

but I am sorry I failed to configure the key combination.

Any advice would be mostly welcome.
#2
What control it is? Can I test?
What keys you would use to clear it manually or with the key function?
#3
Many thanks for your help. The control to be cleared is number 5 in the following dialog. The key combination to manually clear could be "Home - Shift/End - Back".

Function tempf05
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 45 "Dialog"
;3 Static 0x54000000 0x0 6 3 60 12 "Θερμοκρασία (C) :"
;4 Static 0x54000000 0x0 123 3 50 12 "Υγρασία (%)  :"
;5 Edit 0x540300C2 0x204 71 3 31 12 ""
;8 Edit 0x540320C2 0x204 177 3 31 12 ""
;6 Button 0x54032000 0x0 5 24 48 14 "Calculate"
;7 Edit 0x54030880 0x200 66 25 103 14 ""
;1 Button 0x54030001 0x4 172 24 48 14 "Exit"
;END DIALOG
;DIALOG EDITOR: "" 0x2040400 "*" "" "" ""

str controls = "5 7 8"
str e5 e7 e8
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#4
Why SendKeysToWindow? Why not setwintext?
#5
You are absolutely right. However, what would you propose to position the cursor, immediately after clearing its content to field numbered 5?
#6
To show the text cursor (caret) in the field? Need to focus the control.
#7
Thank you for your help. Best regards.


Forum Jump:


Users browsing this thread: 1 Guest(s)