Author Topic: Web Browser  (Read 26699 times)

0 Members and 1 Guest are viewing this topic.

kryton9

  • Guest
Re: Web Browser
« Reply #45 on: July 29, 2013, 12:22:42 PM »
Hey Kent...where are you :)
Sorry Aurel, it has been sometime since I worked with ebasic. So I didn't have any help to offer.

Aurel

  • Guest
Re: Web Browser
« Reply #46 on: July 29, 2013, 12:25:44 PM »
Don't worry Kent, i know that you create some dll-s but with this web browser is little bit specific
situation,however i have found something in xbLite -which use atl.dll .

kryton9

  • Guest
Re: Web Browser
« Reply #47 on: July 29, 2013, 12:29:12 PM »
Quote
Hey Kent...where are you

Last I heard he was working on his IUP centric cross platform application generator. His integrated help system uses the embedded IUP web browser control and the new IupScintilla control for code editing. I haven't received a response yet if he has any interest in embedding SB for his scripting needs.  :o

It looks like you need to get the lead out and find a solution for RubenDev soon. Paul isn't up for a parole hearing for another 10 years so you're on your own.


John, where is the example for IUP with web browser you mentioned to Aurel, I missed that post I guess?  IUP looks very interesting and will be great to use for my help system.
I am thinking of using SQLite for the help data, then present queries outputted to html and formatted with css using IUP, at least that is my plan.

I have been refactoring all my code to have uniform appearance in the meantime, but I am soon ready to document what I have so far.

I am not skilled yet at implementing embedding systems John, but scriptbasic might be a great way to develop my help system with iup and sqlite. I will test that out this week.

JRS

  • Guest
Re: Web Browser
« Reply #48 on: July 29, 2013, 03:01:42 PM »
Wow! My crystal ball didn't lie.  :D

Here is an example of using the IUP web browser control with BaCon under Linux. I haven't tried it with Windows yet. (don't tell Aurel)


kryton9

  • Guest
Re: Web Browser
« Reply #49 on: July 29, 2013, 04:38:43 PM »
John, I am amazed at how you can work with all of these languages and libraries. Looks like you are using ubuntu in those examples. I have had good experiences and bad ones with ubuntu, depending on the version installed. But lately, through Virtual Machines, it has been pretty good, except no direct access to opengl.

I am thinking of getting the raspberry pi or the beaglebone black. The beaglebone comes with Angstrom Linux, never heard or used that before. The Raspberry you have to install a version of Debian. Any recommendations. I would like to run linux on dedicated hardware and get out of virtual machines.

Anyways, thanks you have given me lots to learn and I was blown away when I saw your crystal ball report, it does WORK!

Aurel

  • Guest
Re: Web Browser
« Reply #50 on: July 31, 2013, 01:18:51 PM »
It looks that the simpliest way will be with ATL based browser than with EB dll( pointer problems).
I have found one JoseRoca example and do the quick  test to see if container is created and it looks that is ;)
Code: [Select]
'gui-skeleton app
$ Filename "ABrowser.exe"
Include "RTL32.inc"
Include "awinh.inc"

#lookahead
INT win,win2
INT x,y,w,h,x2,y2,w2,h2
x=0:y=10:w=800:h=600
x2=410:y2=10:w2=400:h2=300
INT winstyle,wstyle2
winstyle = WS_MINMAXSIZE or WS_CLIPCHILDREN
wbstyle = WS_CHILD OR WS_VISIBLE OR WS_BORDER
INT b0ID = 100
'##### GLOBALS  ###############################################
% WM_FORWARDMSG = &H37F ' (895)

% IDB_BACK = 1001
% IDB_FWRD = 1002
% IDB_NAVG = 1003
% IDC_URL  = 1004
% IDC_WB   = 1005

DECLARE FUNCTION AtlAxWinInit LIB "ATL.DLL" ALIAS "AtlAxWinInit" () AS LONG
DECLARE FUNCTION AtlAxGetControl LIB "ATL.DLL" ALIAS "AtlAxGetControl" ( BYVAL hWnd AS sys,BYREF pp AS sys ) as INT
INT hWb
'##############################################################
'create window **************************************************
win = SetWindow("ATL:Browser",x,y,w,h,0,winstyle)
'
'create button on win
'button0 = SetButton(win,80,4,80,26,"Close Window",0x50000000,0x200,b0ID)
'create second window
AtlAxWinInit   ' // Initializes ATL

hWb = CreateWindowEx(0, "AtlAxWin", "Shell.Explorer",wbstyle , 8, 40, w-10, h - 70, win, IDC_WB, 0, 0)
'****************************************************************

'/////////
Wait()
'\\\\\\\\\

Function WndProc (sys hwnd,wmsg,wparam,lparam) as sys callback

SELECT hwnd
'----------------------------------------
CASE win
'----------------------------------------
Select wmsg

CASE WM_CLOSE
DestroyWindow win
PostQuitMessage 0

CASE WM_SIZE
'get current size of window
GetSize(win,0,0,w,h)
',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    CASE WM_COMMAND
controlID = LoWord(wParam) 'get control ID
notifyCode = HiWord(wParam) 'get notification message

Select controlID
   CASE b0ID
If notifycode=0         
         CloseWindow(win)
         EndProgram       
End If
    End Select
End select


END SELECT

RETURN Default

END FUNCTION
'----------------------------------------------------
'##########################################################




JRS

  • Guest
Re: Web Browser
« Reply #51 on: July 31, 2013, 01:46:46 PM »
That's a big step Aurel. If you can get Jose Roca's COM code working in O2, you will be much farther down the road if you had to convert C code to make it work. The FB web browser example is a taste of what you would have to go through to make it work.


Aurel

  • Guest
Re: Web Browser
« Reply #52 on: July 31, 2013, 03:01:18 PM »
John
I just use atl functions and compare both examples...one
from PowerBasic and similar from xbLite atl example.
Infact xbLite is little bit more clear to use and to see what is what.. ;)

JRS

  • Guest
Re: Web Browser
« Reply #53 on: July 31, 2013, 06:32:05 PM »
The important thing is you understand what your looking at. It seems everyone has their own way of serving up COM.

Aurel

  • Guest
Re: Web Browser
« Reply #54 on: August 01, 2013, 03:23:13 PM »
Yes there are few different aproaches to this stuff.
I just look again into JoseRoca - MiniBrowser and i think that this might be ok solution. ;)

JRS

  • Guest
Re: Web Browser
« Reply #55 on: August 01, 2013, 05:20:59 PM »
If you get Jose's web browser example working in O2, you will become the COM king here on the forum.

Better yet if you can get Jose's include files working, (preprocessor ?) that would be awesome.


Aurel

  • Guest
Re: Web Browser
« Reply #56 on: August 02, 2013, 02:52:59 AM »
Jose include is a huge ...
i have found only two strange things...
type DISPATCH
and i think vObj with PowerBasic ifisobject command.
In Minibrowser is used combination of SendMessage with objects.. ???
Hmm probably this will be combinbation of xbLite stuff and PowerBasic stuff.. ::)

Frankolinox

  • Guest
Re: Web Browser
« Reply #57 on: August 02, 2013, 03:11:27 AM »
hello aurel. two sites (pages) ago I have sent you some code snippets for your question. In my eyes it's not very wise / intelligent to convert ready pobwerbasic commands and object handling (classes and more) for oxygen. you will find more stuff around web browser in freebasic / c++ forum for this task they show youre basically function for it. to translate include files from pbwin to oxygen isn't always a good way that's my experience until today. often you need much less code lines for oxygen and only need declare function at the top for needed *.dll you'd like to work with. there are much more inconveniance between powerbasic and oxygen you know ;) better you're looking at freebasic site. but that's only my personal opinion.

regards, frank

Aurel

  • Guest
Re: Web Browser
« Reply #58 on: August 02, 2013, 06:19:32 AM »
FreeBasic example is not far clear than powerBasic at ALL...
and i don't know why both of you ignore my words about xBlite ,looks to me that no
one here know for xBLite  ???...
So I REPEAT....
I probably will go in this direction -> powerBasic & xBLite

Aurel

  • Guest
Re: Web Browser
« Reply #59 on: August 02, 2013, 06:22:25 AM »
So for now i have this( look in screenshot).
Code: [Select]
'gui-skeleton app
$ Filename "ABrowser.exe"
Include "RTL32.inc"
Include "awinh.inc"

#lookahead
INT win,win2
INT x,y,w,h,x2,y2,w2,h2
x=0:y=10:w=800:h=600
x2=410:y2=10:w2=400:h2=300
INT winstyle,wstyle2
winstyle = WS_MINMAXSIZE or WS_CLIPCHILDREN
wbstyle = WS_CHILD OR WS_VISIBLE OR WS_BORDER
INT btt0,btt1,btt2
INT b0ID = 100, b1ID=101, b2ID=102
INT bmpB0,bmpB1,bmpB2,bmpB3,bmpB4,bmpB5
bmpB0 = LoadImage(0,"data/goback.bmp",0,28,28,16)
bmpB1 = LoadImage(0,"data/btOpen.bmp",0,30,30,16)
bmpB2 = LoadImage(0,"data/btSave.bmp",0,30,30,16)
'##### GLOBALS  ###############################################
% WM_FORWARDMSG = &H37F ' (895)

% IDB_BACK = 1001
% IDB_FWRD = 1002
% IDB_NAVG = 1003
% IDC_URL  = 1004
% IDC_WB   = 1005

DECLARE FUNCTION AtlAxWinInit LIB "ATL.DLL" ALIAS "AtlAxWinInit" () AS LONG
DECLARE FUNCTION AtlAxGetControl LIB "ATL.DLL" ALIAS "AtlAxGetControl" ( BYVAL hWnd AS sys,BYREF pp AS sys ) as INT
INT hWb
'##############################################################
'create window **************************************************
win = SetWindow("ATL:Browser",x,y,w,h,0,winstyle)
'****************************************************************
'create buttons
btt0 = SetButton(win,4,4,30,30,"<<",0x50000080,0x200,b0ID)
SendMessage btt0 , BM_SETIMAGE, 0, bmpB0

'Initializes ATL
AtlAxWinInit   
'create browser window
hWb = CreateWindowEx(0, "AtlAxWin", "www.google.com",wbstyle , 4, 40, w-16,(h-56)-64, win, IDC_WB, 0, 0)
'****************************************************************

'/////////
Wait()
'\\\\\\\\\

Function WndProc (sys hwnd,wmsg,wparam,lparam) as sys callback

SELECT hwnd
'----------------------------------------
CASE win
'----------------------------------------
Select wmsg

CASE WM_CLOSE
DestroyWindow win
PostQuitMessage 0

CASE WM_SIZE
GetSize(win,0,0,w,h)
MoveWindow(hWb,4,40,w-6,(h-56)-32 ,1)
',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    CASE WM_COMMAND
controlID = LoWord(wParam) 'get control ID
notifyCode = HiWord(wParam) 'get notification message

Select controlID
   CASE b0ID
If notifycode=0         
         CloseWindow(win)
         EndProgram       
End If
    End Select
End select


END SELECT

RETURN Default

END FUNCTION
'----------------------------------------------------
'##########################################################




X