ActiveX control developement--help
-
i am developing an activeX control which displays a print preview.The print preview style depends on user input.The styles are controlled by print preview template files which reside on the web server. i am using the following code: CComPtr spContainer; CComPtr spSP; CComPtr spWB; CComPtr spDisp; CComPtr spDoc; CComPtr spCT; CComVariant vPTPath = "res://BrochureMachine.dll/PT.htm"; m_spClientSite->GetContainer(&spContainer); spContainer->QueryInterface(IID_IServiceProvider, (void**)&spSP); spSP->QueryService(SID_SWebBrowserApp, IID_IWebBrowser, (void**)&spWB); spWB->get_Document(&spDisp); spDisp->QueryInterface(IID_IHTMLDocument2, (void**)&spDoc); spDoc->QueryInterface(IID_IOleCommandTarget, (void**)&spCT); spCT->Exec(&CGID_MSHTML, IDM_PRINTPREVIEW, NULL, &vPTPath, NULL); return S_OK; this compiles fine but when i execute it i get a blank print teplate file.But when the file url is used everthing goes fine. Waiting for your valuable help regards jithus
-
i am developing an activeX control which displays a print preview.The print preview style depends on user input.The styles are controlled by print preview template files which reside on the web server. i am using the following code: CComPtr spContainer; CComPtr spSP; CComPtr spWB; CComPtr spDisp; CComPtr spDoc; CComPtr spCT; CComVariant vPTPath = "res://BrochureMachine.dll/PT.htm"; m_spClientSite->GetContainer(&spContainer); spContainer->QueryInterface(IID_IServiceProvider, (void**)&spSP); spSP->QueryService(SID_SWebBrowserApp, IID_IWebBrowser, (void**)&spWB); spWB->get_Document(&spDisp); spDisp->QueryInterface(IID_IHTMLDocument2, (void**)&spDoc); spDoc->QueryInterface(IID_IOleCommandTarget, (void**)&spCT); spCT->Exec(&CGID_MSHTML, IDM_PRINTPREVIEW, NULL, &vPTPath, NULL); return S_OK; this compiles fine but when i execute it i get a blank print teplate file.But when the file url is used everthing goes fine. Waiting for your valuable help regards jithus