Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SHDocVw.WebBrowser killfocus
#1
Is there a way to implement a killfocus for a SHDocVw.WebBrowser control?

Function killfocus_shdoc
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 255 213 "Dialog"
;3 ActiveX 0x54030000 0x0 15 10 218 170 "SHDocVw.WebBrowser"
;4 Edit 0x54030080 0x200 100 183 115 12 ""
;5 Static 0x54000000 0x0 27 185 72 9 "some other inputfield:"
;END DIALOG
;DIALOG EDITOR: "" 0x2040601 "*" "" "" ""

str controls = "3 4"
str ax3SHD e4
ax3SHD="d:\"
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

EDIT 
Another question:
With Acc a.Select you select/focus an item in the SHDocVw.WebBrowser control. But how can you scroll to an item when it's not visible (in order to select it)?
#2
SetFocus hDlg

try
Macro Macro388
Code:
Copy      Help
,SetFocus child(a)
,a.Select(3)
,key RL
#3
If it is SysListView32, use LVM_ENSUREVISIBLE. Code in dialog procedure:
Code:
Copy      Help
,int lv=child("" "SysListView32" hDlg)
,SetFocus lv
,Acc a.Find(lv "LISTITEM" "VM" "" 0x1015)
,a.Select(3)
,SendMessage lv LVM_ENSUREVISIBLE a.elem-1 0
#4
YES! LVM_ENSUREVISIBLE  works!
Thank you!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)