News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

html display

Started by dougiem, October 10, 2006, 04:52:54 AM

Previous topic - Next topic

ToutEnMasm


PBrennick

Thank you, I was looking for something like that to show the Sudoku Worksheets.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

elmo

hi dougiem, that's a great app! :U
But when I pass SADD("C:\") to MultiByteToWideChar, the Windows' Form appear.
Sorry, but I think this is embarrass.
When I type C:\ on address bar of Mozilla firefox or Google Chrome  it also show file' list in directory C:\. but they not open it with Windows' Form.
How can we make your app to become like that?
or maybe would you like to give me some clue or other link?

here is other link:
http://www.masm32.com/board/index.php?topic=10904.msg80033#msg80033

thank you

sorry for my bad english.




;CREATE WEBBROWSER1
;load com libs
invoke CoInitialize,0


;initialize the Active Template Library classes: invoke AtlAxWinInit
invoke LoadLibrary,SADD("atl.dll")
mov hATLlib,eax
invoke GetProcAddress,hATLlib,SADD("AtlAxWinInit")
call eax


;Create the WebBrowser window
invoke CreateWindowEx,
NULL,
SADD("AtlAxWin"),
NULL,
WS_CHILD or WS_VISIBLE or WS_BORDER or WS_VSCROLL or WS_HSCROLL,
0,25,500,472,hWin,NULL,
400000h,NULL
mov hATLweb,eax
invoke ShowWindow,hATLweb,SW_HIDE
invoke RegisterWindowMessage,SADD("WM_ATLGETHOST")
mov WMhost,eax
invoke SendMessage,hATLweb,WMhost,0,0 ;get the host object [window]
mov HostObject,eax
ole32 HostObject,0,offset IID_IAxWinHostWindow,offset pIwebHost ;QueryInterface
;to IAxWinHostWindow vtable

;create page
;get html page address then pass it to MultiByteToWideChar
invoke MultiByteToWideChar,CP_ACP,0,SADD("C:\"),-1,addr uHtml,MAX_PATH*2
ole32 pIwebHost,IAxWinHostWindow_CreateControl,offset uHtml,hATLweb,0
invoke RegisterWindowMessage,SADD("WM_ATLGETCONTROL")
invoke SendMessage,hATLweb,eax,0,0 ;get loaded object [htmlpage]
mov browserObject,eax
ole32 browserObject,0,offset IID_IWebBrowser2,offset pIweb2obj ;QueryInterface
;to IWebBrowser2 vtable this-> to set pages
be the king of accounting programmer world!

donkey

Hi elmo,

The IWebBrowser interface simply loads a Microsoft Internet Explorer control into an ATL window in this case. The control will act exactly as IE does and that will always open an Explorer window when you type a local path (without a filename) into the address bar. The way its displayed is a result of how it handles the FILE: protocol when dealing with folders, which is different between the Gecko engine (which generates an XHTML file) and the IE engine.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable