Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Toolbar with Web Browser over Toolbar?
#1
Hi there,

I've created a Toolbar with function ToolbarExProc_TWWB. How can I create the Window over the Toolbar so I can dock it to the bottom(with autoshrink)?

So it looks like in the attachment.

Thanks

Staati


Attached Files Image(s)
   
#2
Use this hook function instead of ToolbarExProc_TWWB.

Function ToolbarExProc_TWWB_Above
Code:
Copy      Help
;/
function# hWnd message wParam lParam

sel message
,case WM_INITDIALOG
,int h=CreateControl(0 "ActiveX" "SHDocVw.WebBrowser" 0 0 0 400 200 hWnd 100)
,_s=""; _s.setwintext(h) ;;opens blank page. Instead of "" you also can pass an url or HTML. Or open web page using Navigate (see below).
,
,;SHDocVw.WebBrowser b._getcontrol(h)
,;b.Navigate("http://www.google.com")
,
,goto g1
,case WM_SIZE
,;g1
,h=id(100 hWnd); if(!h) ret
,RECT r; GetClientRect(hWnd &r)
,MoveWindow h 0 0 r.right r.bottom-20 1
,h=id(9999 hWnd)
,MoveWindow h 0 r.bottom-20 r.right 20 1
,ret 1
,
,case WM_DESTROY
,
#3
Thanks Gintaras!
It works perfect.
#4
Well almost...

I made a Resize(siz x y) on every Window so the window machtes the content. Problem is that the window resizes from the top left and so I can't really put it on se bottom of windows. Is there a possibility to change it to bottom left? So siz expands upwards?

Edit:
Hmm "/mov" as initial uses the bottom left corner, but "mov 0 0" in the bar uses the top left..so I can't just use
"move 0 0" after every resize :/
#5
Need some calculations and MoveWindow. I don't know what does Resize, and where it is used...
#6
Toolbar dictbar_u_start
Code:
Copy      Help
;/hook __dictbar_u_start /siz 350 300 /set 2|8|0x1000|0x200 /ssiz 60 25 /mov 0 0
Back :web "Back" 0 TriggerWindow; err* undo.ico
dict :OpenInTbWebBrowser "http://pocket.dict.cc/?s="; siz 300 300 win("DICTBAR" "QM_toolbar") **
Leo :OpenInTbWebBrowser "http://pda.leo.org/ende?lp=ende&p=wlqAU.&search="; siz 300 300 win("DICTBAR" "QM_toolbar") **
TEL :OpenInTbWebBrowser "http://www.intra.fresenius.de/apps/various/inphbook.nsf/4b50bdb7b9d79078412568680075d24b/$searchForm?SearchView"; siz 420 400 win("DICTBAR" "QM_toolbar") **
google :OpenInTbWebBrowser "http://www.google.de/"; siz 610 600 win("DICTBAR" "QM_toolbar") **
tmbk :OpenInTbWebBrowser "http://www.sauseschritt.com/tombeck/index.php"; siz 787 503 win("DICTBAR" "QM_toolbar") **
:clo val(_command) * close.ico
#7
Function TB_DictbarOpen
Code:
Copy      Help
;/
function $url width height

;Opens URL in toolbar, and resizes.

;EXAMPLE
;dict :TB_DictbarOpen "http://pocket.dict.cc/?s=" 300 300 **


OpenInTbWebBrowser url

int h=TriggerWindow
int le to he
GetWorkArea le to 0 he

MoveWindow h le to+he-height width height 1

in toolbar replace all
OpenInTbWebBrowser...siz...
to
TB_DictbarOpen...
#8
Thanks again Gintaras simple but effective!
So simple that i'm feeling kind of stupid Wink


Forum Jump:


Users browsing this thread: 1 Guest(s)