Click here to Skip to main content
15,912,756 members
Home / Discussions / Web Development
   

Web Development

 
GeneralExcecute commandline Pin
pork chop14-Jul-04 5:26
pork chop14-Jul-04 5:26 
GeneralError message Cannot update database or object read only Pin
Mekong River13-Jul-04 3:26
Mekong River13-Jul-04 3:26 
GeneralDHTML and MFC Pin
CodeBrain13-Jul-04 0:43
CodeBrain13-Jul-04 0:43 
GeneralRe: DHTML and MFC Pin
Andrew Quinn AUS13-Jul-04 22:26
Andrew Quinn AUS13-Jul-04 22:26 
GeneralRe: DHTML and MFC Pin
CodeBrain14-Jul-04 4:08
CodeBrain14-Jul-04 4:08 
GeneralRe: DHTML and MFC Pin
Andrew Quinn AUS14-Jul-04 5:22
Andrew Quinn AUS14-Jul-04 5:22 
GeneralRe: DHTML and MFC Pin
CodeBrain15-Jul-04 4:00
CodeBrain15-Jul-04 4:00 
GeneralRe: DHTML and MFC Pin
Andrew Quinn AUS15-Jul-04 4:25
Andrew Quinn AUS15-Jul-04 4:25 
Hi,

I would always use the wrappers as it will ease the time and readablity of your code. As an example, here is some code without the use of the wrappers:
IUnknown* lpUnk = m_pSite->GetObjectUnknown();
if ( lpUnk != NULL )
{
	HRESULT hr;

	IHTMLDocument2* pHTMLDocument2;
	hr = lpUnk->QueryInterface(IID_IHTMLDocument2, (void **)&pHTMLDocument2);
	if ( SUCCEEDED( hr ) )
	{
		BSTR bstrColor = SysAllocString( buff );
		VARIANT varColor;
		varColor.vt = VT_BSTR;
		varColor.bstrVal = bstrColor;
		hr = pHTMLDocument2-> put_bgColor( varColor );
		pHTMLDocument2->Release();
	}
}


and now the same code with the use of the wrappers:
MSHTML::IHTMLDocument2Ptr spDoc(m_pSite->GetObjectUnknown());
if (spDoc)
{
	spDoc->bgColor = bstr_t("#ffffff");
}


As you can see it is substantially cleaner. And this was a simple example.

You can also call any Javascript functions (from MFC) that are in the HTML page (I can show you how if you need to)
And also, you can implement an event handler at the MFC side such that, for example, an onclick HTML event will cause the web browser control to call into your application.


Hope this helps,
Andy
GeneralRe: DHTML and MFC Pin
CodeBrain15-Jul-04 7:15
CodeBrain15-Jul-04 7:15 
Generaljava/tomcat 5.0 Pin
zedic12-Jul-04 23:40
zedic12-Jul-04 23:40 
Generalcrystal reports problem Pin
Member 120813911-Jul-04 22:27
Member 120813911-Jul-04 22:27 
GeneralE-mail address around the world Pin
Mekong River10-Jul-04 6:34
Mekong River10-Jul-04 6:34 
GeneralRe: E-mail address around the world Pin
Colin Angus Mackay - Guarding his email address10-Jul-04 6:58
sussColin Angus Mackay - Guarding his email address10-Jul-04 6:58 
GeneralRe: E-mail address around the world Pin
Mekong River10-Jul-04 23:32
Mekong River10-Jul-04 23:32 
GeneralRe: E-mail address around the world Pin
Colin Angus Mackay - Not quite convinced14-Jul-04 20:39
sussColin Angus Mackay - Not quite convinced14-Jul-04 20:39 
GeneralRe: E-mail address around the world Pin
Mekong River17-Jul-04 4:14
Mekong River17-Jul-04 4:14 
GeneralRe: E-mail address around the world Pin
alex.barylski10-Jul-04 17:24
alex.barylski10-Jul-04 17:24 
GeneralRe: E-mail address around the world Pin
betoalvo8-Aug-04 4:47
betoalvo8-Aug-04 4:47 
GeneralNo Horizontal bar in html Pin
Anonymous9-Jul-04 7:25
Anonymous9-Jul-04 7:25 
GeneralRe: No Horizontal bar in html Pin
palbano9-Jul-04 7:42
palbano9-Jul-04 7:42 
GeneralSending Mail through HTML Pin
Anonymous9-Jul-04 7:04
Anonymous9-Jul-04 7:04 
GeneralRe: Sending Mail through HTML Pin
palbano9-Jul-04 7:41
palbano9-Jul-04 7:41 
GeneralRe: Sending Mail through HTML Pin
Scit12-Jul-04 21:51
Scit12-Jul-04 21:51 
GeneralHorizontal scroll bar in list box in asp -Urgent plz Pin
carmelchocos9-Jul-04 5:02
carmelchocos9-Jul-04 5:02 
Generalscript on this page is ... Pin
Marian779-Jul-04 3:22
Marian779-Jul-04 3:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.