Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Select text when the edit box is focus
#1
Hi,

I want to achieve an effect where the text inside the edit box is selected while the edit box is in focus
How to use the following code?
Code:
Copy      Help
PostMessage(EM_SETSEL, 0, -1)

Thanks in advance for any advice and help
david


Macro Macro3
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Edit 0x54020080 0x200 16 24 96 12 ""
;4 Edit 0x54020080 0x200 16 48 96 12 ""
;5 Edit 0x54020080 0x200 16 72 96 12 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""

str controls = "3 4 5"
str e3 e4 e5
e3="hello"
e4="world"
e5="hello"
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 IDOK
,case IDCANCEL
ret 1


Messages In This Thread
Select text when the edit box is focus - by Davider - 02-02-2023, 01:16 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)