put unicode mods back in
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		| @@ -242,7 +242,7 @@ void wxIEHtmlWin::SetCharset(wxString charset) | |||||||
| 	{ | 	{ | ||||||
| 		wxAutoOleInterface<IHTMLDocument2> doc(IID_IHTMLDocument2, disp); | 		wxAutoOleInterface<IHTMLDocument2> doc(IID_IHTMLDocument2, disp); | ||||||
| 		if (doc.Ok()) | 		if (doc.Ok()) | ||||||
| 			doc->put_charset((BSTR) wxConvUTF8.cMB2WC(charset).data()); |             doc->put_charset((BSTR) (const wchar_t*)charset.wc_str(wxConvUTF8)); | ||||||
| 	}; | 	}; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| @@ -317,14 +317,14 @@ void wxIEHtmlWin::LoadUrl(const wxString& url) | |||||||
| 	headers.vt = VT_EMPTY; | 	headers.vt = VT_EMPTY; | ||||||
|  |  | ||||||
| 	HRESULT hret = 0; | 	HRESULT hret = 0; | ||||||
| 	hret = m_webBrowser->Navigate((BSTR) wxConvUTF8.cMB2WC(url).data(),  | 	hret = m_webBrowser->Navigate((BSTR) (const wchar_t*)url.wc_str(wxConvUTF8), | ||||||
| 		&navFlag, &targetFrame, &postData, &headers); | 		&navFlag, &targetFrame, &postData, &headers); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
| bool  wxIEHtmlWin::LoadString(wxString html) | bool  wxIEHtmlWin::LoadString(wxString html) | ||||||
| { | { | ||||||
| 	string s = html.c_str(); | 	string s = html.mb_str(wxConvUTF8); | ||||||
| 	istringstream *is = new istringstream(s); | 	istringstream *is = new istringstream(s); | ||||||
| 	return LoadStream(is); | 	return LoadStream(is); | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -30,7 +30,14 @@ Source Files: | |||||||
|  |  | ||||||
| Event Handling: | Event Handling: | ||||||
| --------------- | --------------- | ||||||
| - None currently | - EVT_ACTIVEX(id, eventName, handler) (handler = void OnActiveX(wxActiveXEvent& event)) | ||||||
|  | class wxActiveXEvent : public wxNotifyEvent | ||||||
|  |     int ParamCount() const; | ||||||
|  |     wxVariant  operator[] (int idx) const;	// parameter by index | ||||||
|  |     wxVariant& operator[] (int idx); | ||||||
|  |     wxVariant  operator[] (wxString name) const; // named parameters | ||||||
|  |     wxVariant& operator[] (wxString name); | ||||||
|  |  | ||||||
|  |  | ||||||
| Members: | Members: | ||||||
| -------- | -------- | ||||||
| @@ -60,6 +67,19 @@ e.g. | |||||||
|     delete events; |     delete events; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | Sample Events: | ||||||
|  | -------------- | ||||||
|  | EVT_ACTIVEX(ID_MSHTML, "BeforeNavigate2",   OnMSHTMLBeforeNavigate2X) | ||||||
|  |  | ||||||
|  | void wxIEFrame::OnMSHTMLBeforeNavigate2X(wxActiveXEvent& event) | ||||||
|  | { | ||||||
|  |   wxString url = event["Url"]; | ||||||
|  |  | ||||||
|  |   int rc = wxMessageBox(url, "Allow open url ?", wxYES_NO); | ||||||
|  |  | ||||||
|  |   if (rc != wxYES) | ||||||
|  |     event["Cancel"] = true; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  |  | ||||||
| wxIEHtmlWin: | wxIEHtmlWin: | ||||||
|   | |||||||
| @@ -207,7 +207,7 @@ wxActiveX::wxActiveX(wxWindow * parent, wxString progId, wxWindowID id, | |||||||
| { | { | ||||||
|     m_bAmbientUserMode = true; |     m_bAmbientUserMode = true; | ||||||
|     m_docAdviseCookie = 0; |     m_docAdviseCookie = 0; | ||||||
|     CreateActiveX((LPOLESTR) wxConvUTF8.cMB2WC(progId).data()); |     CreateActiveX((LPOLESTR) (const wchar_t*)progId.wc_str(wxConvUTF8)); | ||||||
| } | } | ||||||
|  |  | ||||||
| wxActiveX::~wxActiveX() | wxActiveX::~wxActiveX() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user