Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RichEdit20A EM_SETSEL
#1
why is the RichEdit20A EM_SETSEL not working ?
it should stay selected.

microbender_pass
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "4 6"
str server dbname
server="localhost.home"
dbname="test"

if(!ShowDialog("microbender_pass" &microbender_pass &controls)) ret


;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 376 298 "Dialog"
;1 Button 0x54030001 0x4 256 274 48 14 "OK"
;2 Button 0x54030000 0x4 316 274 48 14 "Cancel"
;3 Static 0x54000000 0x0 4 6 48 12 "DB Server"
;4 RichEdit20A 0x54231840 0x200 58 4 106 14 ""
;5 Static 0x54000000 0x0 4 22 48 12 "DB Name"
;6 RichEdit20A 0x54231840 0x200 58 20 106 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020008 "" ""


ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case EN_SETFOCUS<<16|4
,int he=id(4 hDlg)
,SendMessage he EM_SETSEL 0 -1 ;;select all

,case IDOK
,case IDCANCEL
ret 1
pi
#2
Edit box receives mouse button message after EN_SETFOCUS. You can PostMessage hDlg WM_APP 0 0, and on WM_APP (which must be in the first sel) set selection. Posted message arrives after the control receives mouse button message.

Easier way - use simple combo instead.
#3
i want to use RichEdit20A because the text can be dropped into firefox.
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)