bgiGetHTMLURL

Retrieves the current URL of the loaded document in the HTMLView control. Takes htmlViewID (Int). Returns UTF-8 URL string, or empty string "" if htmlViewID not found or URL unavailable.

BGI GUI

Parameters & Returns

Parameters

htmlViewID Int

Returns

String

Quick Summary

Retrieves the current URL of the loaded document in the HTMLView control. Takes htmlViewID (Int). Returns UTF-8 URL string, or empty string "" if htmlViewID not found or URL unavailable.

Technical Exegesis...

Retrieves the current URL of the loaded document in the HTMLView control. Searches webBrowserMap for htmlViewID. If found, gets IWebBrowser2* interface. Calls get_LocationURL(&bstrURL) to retrieve current location BSTR. Converts BSTR to UTF-8 std::string using WideCharToMultiByte with CP_UTF8. SysFreeString releases BSTR. Returns UTF-8 URL string, or empty string "" if htmlViewID not found or URL unavailable.

This function returns the document's current URL/location.

Example

Example.bam
; No example implemented yet