Jump to content

WriteDoc for Embedded IE to show SVG not work


Recommended Posts

I can't show SVG content using _IEWriteDocHTML!

If i save the same SVG code into a file and navigate to the file, it works.

Global $oIE = _IECreateEmbedded()
GUICreate('TEXT?',180,99,5,5, BitOR(0x00C00000, 0x00080000))
GUICtrlCreateObj($oIE,4,4,172,64)



_IENavigate($oIE, "about:blank")
_IEDocWriteHTML($oIE, '<HTML><BODY><svg xmlns="http://www.w3.org/2000/svg" width="400" height="110"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" /> Sorry, your browser does not support inline SVG. </svg></BODY></HTML>')
While 1
    GUISetState() ; This part will show svg not supported message!
Wend



_IENavigate($oIE, @ScriptDir&'\1.svg')
While 1
    GUISetState() ; This part will show svg correctly.
Wend

If i use _IECreate() it works too.

I'm on win 10 x64 with IE 11

Edited by HamidZaeri
Link to comment
Share on other sites

Found solution, thanks to @trancexx

_IENavigate($oIE, "about:blank")
_IEDocWriteHTML($oIE, '<HTML><meta http-equiv="X-UA-Compatible" content="IE=edge"><BODY><svg xmlns="http://www.w3.org/2000/svg" width="400" height="110"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" /> Sorry, your browser does not support inline SVG. </svg></BODY></HTML>')
_IEAction($oIE, "refresh")
While 1
    GUISetState()
Wend

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...