Software FX Posted December 8, 2000 Report Share Posted December 8, 2000 GetHtmlTag assumes that the caller is IIS and it "pushes" the image map through one of the IIS intrinsic COM objects (Response). If you are wrapping Cfx inside a VB object this approach will not work since we do not have a pointer to IIS. In this scenario you have two choices a) ChartFX provides two methods called OnStartPage and OnEndPage, these methods are automatically invoked by IIS when a COM object is created. If you expose these methods you can capture the IIS COM pointer. Then you should invoke these methods (OnStartPage after the chart is created and OnEndPage when the chart is about to be destroyed). The latest service pack in ChartFX exposes a new method called GetHtmlDataEx, this method returns the IMG (in binary format) and the ImgMap (optional) as a string. The problem with this approach is that you will have to either "cache" the image since the browser will request it later or save the Img in a file similar to what ChartFX does (using the CfxTemp folder). GetHtmlDataEx vWidth,vHeight,vBrowser,nFlags,vData,vMap vWidth: VARIANT that specifies the width in pixels. For image generation this variant should contain an integer number. (Similar to GetHtmlTag and GetHtmlData) vHeight: VARIANT that specifies the height in pixels. For image generation this variant should contain an integer number. (Similar to GetHtmlTag and GetHtmlData) vBrowser: VARIANT that specifies the output type. Currently only the following strings are supported: "Image", "Jpeg", "Png", "ActiveX", "Auto", "Plugin". (Similar to GetHtmlTag and GetHtmlData) nFlags: SHORT number that specifies the type of output generated in vData and vMap vData: OUTPUT VARIANT that contains the image data vMap: Used for Image map generation. On Input it can contain the name of the image map to be generated, on Output it may contain the Image Map (depending on nFlags) ------------------------------------------------------ nFlags options vData Flags 0: vData will contain a VT_STREAM object with the image data. No Img Map 1: vData will contain a VT_UI1|VT_ARRAY object with the image data. No Img Map 2: vData will contain a VT_STREAM object with the image data. vMap will contain a VT_STREAM object with the map data 3: vData will contain a VT_UI1|VT_ARRAY object with the image data. vMap will contain a VT_STREAM object with the map data 6: vData will contain a VT_STREAM object with the image data. vMap will contain a VT_BSTR (string) object with the map data 7: vData will contain a VT_UI1|VT_ARRAY object with the image data. vMap will contain a VT_BSTR (string) object with the map data Regards, Juan Cegarra Software FX, Inc. support.softwarefx.com -----Original Message----- From: Tim Chapla [mailto:tchapla@isoftcorp.com] Posted At: Tuesday, December 05, 2000 11:41 AM Posted To: Server Conversation: VB COM wrapper and Image map Subject: VB COM wrapper and Image map I have purchased the Chart FX IE 2000 Build 4.5.15.2 and I am trying to wrap the server side component, ChartfxLib.ChartFX, with a VB COM object. I was able to successfully do this however I am totally unable to get the image map to spit out. I have tried using the following in my VB Component to set the ImgMap property: Chart.ImgMap = CHART_MAP_EMBEDDED Chart.ImgMap = 8 The Chart.GetHtmlTag(500,500, "Image") is just refusing to return the image map. Can someone PLEASE advise tim Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.