Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hitting keyboard return in Browser Dialog web page
#1
Hi Gintaras,
I feel I should know this already but can't find the solution.... I am essentially looking for I case EN_SETFOCUS<16|xxx for a webbrowser control in dialog. I use "case EN_SETFOCUS<16|xxx" for text entry fields in user dialogs when I want the user to be able to be able to hit return on the keyboard after entering text into the field and not close the dialog burt rather do something with the text. I put in something like this for the text field:


Code:
Copy      Help
sel wParam
,case EN_SETFOCUS<<16|14
,,FieldSelected=GetWinId(lParam)


and then in the IDOK line have something like this in the case IDOK line:

]
Code:
Copy      Help
,case IDOK
,,sel FieldSelected
,,,case 1237


But for browser controls, I don't know how to set focused control id to browser control when that has focus. When I hit return in browser, sometimes will do last FieldSelected from prior case EN_SETFOCUS update.

Thanks for any thoughts!,
S
#2
sorry found my previous query post on this which you answered beautifully!

http://www.quickmacros.com/forum/showthr...p?tid=3594

thanks,
S
#3
for some reason it doesn't work for web controls...i.e.

if web ActiveX control is set to id(1001)

if wParam = id(1001 hDlg);
FieldSelected = 1001

doesn't seem to register clicking on the web page. I think it's because the Mouse Info spy isn't showing it as 1001 but as 0 with class of "internet_explorer_server"

How can I focus the CID selected to be the browser window so the browser gets the return from IDOK rather than something else in the dialog?

Sorry, I thought I figured this one out myself :oops:
Thanks again,
S
#4
Code:
Copy      Help
,case IDOK
,if(GetFocus and childtest(GetFocus 0 "" "Internet Explorer_Server" hDlg)) ret


Forum Jump:


Users browsing this thread: 1 Guest(s)