istream -> imoniker (ShowHTMLDialog)

Windows specific forum
User avatar
bingo
Enthusiast
Enthusiast
Posts: 210
Joined: Fri Apr 02, 2004 12:21 pm
Location: germany/thueringen
Contact:

istream -> imoniker (ShowHTMLDialog)

Post by bingo »

it is no problem to show any html popup with ShowHTMLDialog

http://msdn2.microsoft.com/en-us/librar ... S.85).aspx .

but the imoniker is a url only (CreateURLMoniker or CreateURLMonikerEx) . it is possible to read from "about:..." or from resource (res:...) directly .

but i can not found any way to stream the html to this imoniker directly :cry:

1. create istream from html (in memory)
2. create imoniker
3. bind istream to imoniker :?:
["1:0>1"]
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

can't you only create IStream's for files and objects?
User avatar
bingo
Enthusiast
Enthusiast
Posts: 210
Joined: Fri Apr 02, 2004 12:21 pm
Location: germany/thueringen
Contact:

Post by bingo »

Image

Code: Select all

Import "mshtml.lib"
ShowHTMLDialog(hwndParent.l,pMk.l,pvarArgIn.l,pchOptions.p-unicode,pvarArgOut.l)
EndImport

Import "urlmon.lib"
CreateURLMonikerEx(pMkCtx.l,szURL.p-unicode,ppmk.l,dwFlags.l)
EndImport

#URL_MK_LEGACY = 0

VarResult.VARIANT

pMoniker.IMoniker 
CreateURLMonikerEx(0,"about:123",@pMoniker,#URL_MK_LEGACY) 
ShowHTMLDialog(0,pMoniker,0,"dialogHeight:100px;dialogWidth:250px;help:no;status:0;unadorned:0",@VarResult) 
pMoniker\release() 

End
mshtml.lib ...
http://kyf.net/tmp/mshtml.zip

this all is simple and useful in pb ! but how can "patch" this imoniker with any streams from CreateStreamOnHGlobal_(my_html_in_memory,#True,@HtmlStream.IStream) ?
["1:0>1"]
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

hmmm...I don't think CreateStreamOnHGlobal will do what you want. IStream is a storage object and CreateStreamOnHGlobal creates a stream object for a physical file that already exists and the result stream is stored in global memory....what you seem to want to do is put a stream in memory from something exisitng in memory already?

maybe a simple:

CopyMemory_(in_Destination, in_Source, in_ Length) ???


maybe:

http://msdn2.microsoft.com/en-us/librar ... tream.aspx

if you can convert it (its in .Net).

or maybe something on the C++ side for one of the stream functions: http://msdn2.microsoft.com/en-us/librar ... S.80).aspx

Or...write it to disk first then stream the file with CreateStreamOnHGlobal ??
User avatar
bingo
Enthusiast
Enthusiast
Posts: 210
Joined: Fri Apr 02, 2004 12:21 pm
Location: germany/thueringen
Contact:

Post by bingo »

with some method of IBind... should it be possible :

http://msdn2.microsoft.com/en-us/librar ... S.85).aspx :idea: :?:
["1:0>1"]
Post Reply