#Option Explicit
Static %hDisplay, $URL = "http://www.gratilog.net/xoops/"
ApiCall( "AtlAxWinInit", "ATL" )
Fbsl_SetText(ME, "== E M B E D D E D G R A T I L O G ==")
Resize(ME, 0, 0, 800, 640)
Center(ME)
Const hURL = Fbsl_Control("Edit", ME, URL, 0, 10, 3, 368, 23, _
WS_CHILD + WS_TABSTOP + ES_AUTOHSCROLL, WS_EX_CLIENTEDGE)
hDisplay = Fbsl_Control("AtlAxWin", ME, "MSHTML:<HTML></HTML>", _
0, 0, 30, 800, 640, WS_CHILD + WS_VISIBLE, WS_EX_CLIENTEDGE)
'========this eliminates flicker on window resize======
ApiCall( "SetClassLong", "user32", Me, -26, 8 )
EventGo()
PostMessage( Me, WM_SYSCOMMAND, SC_MAXIMIZE, NULL )
RefreshMe()
Show(Me)
Begin Events
Select Case CBMSG
Case WM_SIZE
RefreshMe()
Case WM_CLOSE
ExitProgram(0)
End Select
End Events
Sub EventGo()
Fbsl_GetText(hURL, URL)
If URL = "" Then Return
If (hDisplay <> 0) Then Destroy(hDisplay)
hDisplay = Fbsl_Control("AtlAxWin", ME, URL, 0, 0, 10, 800, 640, _
WS_CHILD + WS_VISIBLE + WS_VSCROLL + WS_HSCROLL, WS_EX_CLIENTEDGE)
RefreshMe()
End Sub
Sub RefreshMe()
Static %Lefti, %Topi, %Righti, %Bottomi
GetClientRect(ME, Lefti, Topi, Righti, Bottomi)
Resize(hDisplay, 5, 5, Righti - 5, Bottomi - 10)
End Sub
Cette contribution était de : http://www.gratilog.net/xoops/newbb/viewtopic.php?forum=2&topic_id=3002&post_id=15688