Click here to Skip to main content
15,793,452 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralSTL map. Pin
WREY9-Dec-03 6:11
WREY9-Dec-03 6:11 
GeneralRe: STL map. Pin
ZoogieZork9-Dec-03 7:28
ZoogieZork9-Dec-03 7:28 
GeneralRe: STL map. Pin
WREY9-Dec-03 10:40
WREY9-Dec-03 10:40 
GeneralRe: STL map. Pin
ZoogieZork9-Dec-03 12:42
ZoogieZork9-Dec-03 12:42 
GeneralRe: STL map. Pin
Jörgen Sigvardsson17-Dec-03 9:18
Jörgen Sigvardsson17-Dec-03 9:18 
GeneralImplementing a COM interface in ATL Pin
Judah Gabriel Himango8-Dec-03 10:18
sponsorJudah Gabriel Himango8-Dec-03 10:18 
GeneralRe: Implementing a COM interface in ATL Pin
Jörgen Sigvardsson12-Dec-03 9:19
Jörgen Sigvardsson12-Dec-03 9:19 
GeneralPrinting with WebBrowser Control Pin
Jo Fredrickson7-Dec-03 19:10
Jo Fredrickson7-Dec-03 19:10 
Hi. I am having some trouble with the Web Browser 2 control. I am able to display my html file within a window in my program, but can't print it. I am using ATL only.

The Nagivate() method has no errors but afterwards the ready state is always READYSTATE_LOADING, even some time after the browser control displays the html. When I try to print with the ExecWB function, I get error "0x80040100 Trying to revoke a drop target that has not been registered". I think there may be problem with the way the object is created?

Here is my code:
<br />
#include exdisp.h    // browser control definitions<br />
#include exdispid.h  // browser event dispatch IDs<br />
#include mshtmcid.h  // IDM constants<br />
<br />
CAxWindow wndIE;<br />
RECT rc = {0,200,800,700};<br />
HWND hIEWnd = wndIE.Create(hWnd, rc, _T(""), WS_CHILD | WS_VISIBLE | WS_THICKFRAME);<br />
CComPtr<IUnknown> punkCtrl;<br />
CComQIPtr<IWebBrowser2> pBrowserApp;<br />
	 <br />
// Create the browser control<br />
wndIE.CreateControlEx ( L"{8856F961-340A-11D0-A96B-00C04FD705A2}", NULL, NULL, &punkCtrl );<br />
pBrowserApp = punkCtrl;<br />
<br />
// Try to load a page and print it<br />
if (pBrowserApp)<br />
{<br />
	CComVariant vEmpty;<br />
	hr = pBrowserApp->Navigate ( CComBSTR("c:\\report.html"), &vEmpty, &vEmpty, &vEmpty, &vEmpty );<br />
	READYSTATE ReadyState;<br />
	hr = pBrowserApp->get_ReadyState(&ReadyState);<br />
	Sleep(3000);<br />
	hr = pBrowserApp->get_ReadyState(&ReadyState);<br />
<br />
	hr = pBrowserApp->ExecWB((OLECMDID)IDM_PRINT, (OLECMDEXECOPT)PRINT_DONTBOTHERUSER, NULL, NULL);<br />
}<br />


Any advice or comments would be greatly appreciated.
Thanks, Joanne Smile | :)
GeneralRe: Printing with WebBrowser Control Pin
Kosenko Kolya19-Dec-03 1:57
Kosenko Kolya19-Dec-03 1:57 
GeneralRe: Printing with WebBrowser Control Pin
Jo Fredrickson19-Dec-03 18:07
Jo Fredrickson19-Dec-03 18:07 
GeneralPersisting STL containers to disk Pin
Jeremy Pullicino5-Dec-03 5:38
Jeremy Pullicino5-Dec-03 5:38 
GeneralRe: Persisting STL containers to disk Pin
Todd Smith5-Dec-03 6:03
Todd Smith5-Dec-03 6:03 
GeneralRe: Persisting STL containers to disk Pin
John M. Drescher15-Dec-03 8:01
John M. Drescher15-Dec-03 8:01 
GeneralRe: Persisting STL containers to disk Pin
valikac5-Dec-03 6:36
valikac5-Dec-03 6:36 
GeneralRe: Dynamically adding a ActiveX control as a resource to a project Pin
Abhishek Srivastava5-Dec-03 1:51
Abhishek Srivastava5-Dec-03 1:51 
QuestionDoes WTL supports serialization? Pin
Deepa D1-Dec-03 20:55
Deepa D1-Dec-03 20:55 
AnswerRe: Does WTL supports serialization? Pin
Steve S3-Dec-03 23:21
Steve S3-Dec-03 23:21 
GeneralCMapPtrToPtr Pin
Anthony_Yio1-Dec-03 16:54
Anthony_Yio1-Dec-03 16:54 
GeneralRe: CMapPtrToPtr Pin
John M. Drescher1-Dec-03 17:51
John M. Drescher1-Dec-03 17:51 
GeneralRe: CMapPtrToPtr Pin
Michael Dunn2-Dec-03 10:25
sitebuilderMichael Dunn2-Dec-03 10:25 
GeneralSTL threading problem Pin
Josh Gray30-Nov-03 12:42
Josh Gray30-Nov-03 12:42 
GeneralRe: STL threading problem Pin
Jörgen Sigvardsson30-Nov-03 13:04
Jörgen Sigvardsson30-Nov-03 13:04 
GeneralRe: STL threading problem Pin
John M. Drescher1-Dec-03 15:19
John M. Drescher1-Dec-03 15:19 
GeneralRe: STL threading problem Pin
Josh Gray1-Dec-03 17:03
Josh Gray1-Dec-03 17:03 
Generalwsnprintf() method __defined_.h_file Pin
derik_konark30-Nov-03 0:50
derik_konark30-Nov-03 0:50 

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.