|
Please get new sdk headers and internet-development headers.
|
|
|
|
|
Do you know _where_ I can find those?
I've found the dowmload for platform sdk, but it's HUGE. Is there a place where the sdk headers and internet-development headers could be downloaded?
|
|
|
|
|
Microsoft has changed how to download, so
I'm struggling too. I do want to know that...
|
|
|
|
|
In ChildFrm.h, I wanted to filter the document HTML code to block specified content, my code in a browser helper object works, but not for Donut.
My code:
void OnDocumentComplete(IDispatch* pDisp, const CString& strURL)
{
CComQIPtr<iwebbrowser2, &iid_iwebbrowser2=""> pWebBrowser2;
pWebBrowser2 = (IWebBrowser2*) pDisp;
if (!pWebBrowser2)
return;
CComQIPtr<ihtmldocument2, &iid_ihtmldocument2=""> pDocument;
HRESULT hr = pWebBrowser2->get_Document((IDispatch**) &pDocument);
if (FAILED(hr) || !pDisp)
return;
CComQIPtr<ihtmlelement> pElement;
///////////// IT CRASHES HERE //////////////
hr = pDocument->get_body(&pElement);
if (FAILED(hr) || !pElement) {
pDocument->Release();
return;
}
BSTR bstrValue = NULL;
pElement->get_innerHTML(&bstrValue);
if (SysStringLen(bstrValue) < 1) {
pDocument->Release();
pElement.Release();
return;
}
BOOL res = MyFilter(bstrValue);
if (res)
pElement->put_innerHTML(bstrValue);
pElement.Release();
SysFreeString(bstrValue);
if (IsPageIWebBrowser(pDisp)) { // it means a page complete downloading
dcfTRACE(_T("CChildFrame::OnDocumentComplete\n"));
m_bWaitNavigateLock = false;// you are allowed!
if (MDIGetActive() == m_hWnd && DonutBrowserCanSetFocus(m_hWnd)) {
_SetPageFocus();
}
}
}
But it always crashed (accesses a NULL pointer) at the tag (//// line). I didn't find what is the problem.
|
|
|
|
|
I guess you don't get IHtmlDocument2 yet.
pWebBrowser2->get_Document is sure to fill a ptr with IDispath ptr,
but it is not IHtmlDocument2 but IDispatch.
CComPtr<IDispatch> spDisp;
HRESULT hr = pWebBrowser2->get_Document(&spDisp);
if (FAILED(hr))
return;
CComQIPtr<IHTMLDocument2> spDoc = spDisp;
if (!spDoc)
return;
|
|
|
|
|
MtlSetClipboardText() does not convert Unicode buffer to ANSI. So it seems that only the first char is filled to clipboard.
Here is a temporary solution:
(1) Remove the ::memcpy line
(2) Add these to ::memcpy position:
for (int i = 0; i < nByte; i++)
pText[i] = str.GetAt(i);
|
|
|
|
|
Thank you.
The fix is this, which I've not test.
<br />
inline bool MtlSetClipboardText(const CString& str, HWND hWnd)<br />
{<br />
if (str.IsEmpty())<br />
return false;<br />
<br />
USES_CONVERSION;<br />
LPCTSTR szText = static_cast<LPCTSTR>(str);<br />
LPCSTR szAnsiText = T2A(const_cast<LPTSTR>(szText));<br />
<br />
int nByte = ::strlen(szAnsiText);<br />
HGLOBAL hText = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, nByte + 1);<br />
if (hText == NULL)<br />
return false;<br />
<br />
BYTE* pText = reinterpret_cast<BYTE*>(::GlobalLock(hText));<br />
if (pText == NULL)<br />
return false;<br />
<br />
::memcpy(pText, szAnsiText, nByte);<br />
<br />
::GlobalUnlock(hText);<br />
<br />
::OpenClipboard(hWnd);<br />
::EmptyClipboard();<br />
::SetClipboardData(CF_TEXT, hText);<br />
::CloseClipboard();<br />
<br />
return true;<br />
}<br />
|
|
|
|
|
C:\Projects\Donut\mtlweb.h(371) : error C2065: 'SHACF_FILESYSTEM' : undeclared identifier
C:\Projects\Donut\mtlweb.h(371) : error C2065: 'SHACF_URLALL' : undeclared identifier
C:\Projects\Donut\mtlweb.h(371) : error C2065: 'SHACF_USETAB' : undeclared identifier
C:\Projects\Donut\DonutView.h(94) : error C2065: 'DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE' : undeclared identifier
Error executing cl.exe.
Donut.exe - 4 error(s), 0 warning(s)
Where are those constants?
|
|
|
|
|
They are defined in MsHtmHst.h and ShLwApi.h.
I think them extended headers, which are included in internet-development headers.
Please download and search them.
Thank you.
|
|
|
|
|
* My Compile Environment is:
Visual Studio v6.0 Enterprise Edit. (latest pack) and
Microsoft Platform SDK (latest version) and WTL(3.1)
--------------------Configuration: Donut - Win32 Release--------------------
Compiling...
Donut.cpp
F:\Temp\IDocHostUIHandlerDispatchImpl.h(25) : error C2668: 'InlineIsEqualGUID' : ambiguous call to overloaded function
Error executing cl.exe.
Donut.exe - 1 error(s), 0 warning(s)
|
|
|
|
|
Same problem here. Are we just stupid or what? I had this problem on the last donut project but I put my WTL to the top of my source includes directory and it fixed it. It didn't work this time. Let me know if you figure it out.
|
|
|
|
|
Please refer to
http://support.microsoft.com/support/kb/articles/Q243/2/98.ASP
Thank you.
|
|
|
|
|
Do you have a new version? Any bugfixes? How about a homepage with more of your code?
|
|
|
|
|
Hello sir,
I'm getting the following error.Pls help out.
Compiling resources...
E:\Zip\web\Donut.rc(10) : fatal error RC1015: cannot open include file 'altres.h'.
Error executing rc.exe.
Donut.exe - 1 error(s), 0 warning(s)
MAIL-ID:maria@sdsindia.com
|
|
|
|
|
Hello.
You have to download the WTL.
|
|
|
|
|
* My Compile Environment is:
Visual Studio v6.0 Enterprise Edit. (Service pack #4) and
Microsoft Platform SDK (Oct 2000) and WTL included
* Target version is:
Donut 2.40R1 (English)
* Error Messages is:
--------------------Configuration: Donut - Win32 Win98_Release--------------------
Compiling resources...
Compiling...
stdafx.cpp
Compiling...
Donut.cpp
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(525) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(521) : while compiling class-template member function 'void __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::_Copy(unsigned int)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\algorithm(38) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
C:\Temp\donut240_r1_en_src\mtlmisc.h(346) : see reference to function template instantiation 'struct CExplorerBarCtrlImpl<class clinkbarctrl<class="" cmainframe="">,class WTL::CToolBarCtrlT<class atl::cwindow="">,class ATL::CWinTraits<1442840576,0> >
::_Function_AddButton __cdecl std::for_each(class WTL::CString *,class WTL::CString *,struct CExplorerBarCtrlImpl<class clinkbarctrl<class="" cmainframe="">,class WTL::CToolBarCtrlT<class atl::cwindow="">,class ATL::CWinTraits<1442840576,0> >::_Function_AddB
utton)' being compiled
Error executing cl.exe.
Donut.exe - 1 error(s), 1 warning(s)
* Please reply... Thanks.
|
|
|
|
|
That's a problem of compile option. ^^;
On Visual C++ "Build" menu, "Set Active Configuration"'s option selection to "Win32 Release".
Now that's ok. Thanks...
|
|
|
|
|
Hi!
I'm get error messages while try compile donut demo:
D:\MSVS\MyProjects\donut\mtlmisc.h(615) : error C2065: '_IsDBCSTrailByte' : undeclared identifier
......
D:\MSVS\MyProjects\donut\MainFrm.h(35) : error C2501: 'CPaneContainer' : missing storage-class or type specifiers
I use: VC++ 6.0 with sp4, Platform SDK July 2000
Please help me!
|
|
|
|
|
WTL3.1 is required.
I guess your SDK is not up-to-date.
Thank you.
|
|
|
|
|
Yes, I have a:
Windows Template Library - WTL Version 3.0 (build 9335) 12/01/99
Which Platform SDK contains WTL 3.1 (or up)???
Can I download WTL separately???
|
|
|
|
|
Hi TB,
Thanks for your _IsDangerousLoopMessage(), I too was suffering from the ie/control bar infinite loop problem.
The 'dangerous' message is WM_KEYDOWN (256) with wparam VK_DOWN (40) which is generated in AtlCtrlw.h line 1537.
What I still don't understand is why it's a problem, if you turn off the styles that enable scroll bars on the views containing the web browser then the problem doesn't occur. The problem also doesn't occur unless you actually activate the web browser view by clicking on it.
The difference seems to be that in the case where it works the PostMessage at line 1537 results in the WM_KEYDOWN message being processed by the toolbar. The toolbar then sends a TBN_DROPDOWN message which the CCommandBarCtrlImpl processes and puts up the appropriate drop down menu. The act of putting up the menu means that the m_bMenuActive flag gets set and this stops the recursive posting of the WM_KEYDOWN message.
Another symptom of the the same problem is that if you press the Alt key, and then press either left or right cursors you should be able to navigate through all the menu
headers - this also stops working.
Anyway your idea of filtering the messages that reach the view certainly overcomes the main problem, so thanks.
Colin.
|
|
|
|
|
Hello.
Regrettably, that is not a complete fix.
In some systems(some users said IE4),
_IsDangerousLoopMessage() can't stop the loop.
I guess lParam a little different in IE4 case.
Thank you.
|
|
|
|
|
After compilation:
Compiling...
Donut.cpp
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(277) : error C2146: syntax error : missing ';' before identifier 'lpnm'
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(872) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(277) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(872) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(277) : error C2501: 'lpnm' : missing storage-class or type specifiers
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(872) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(277) : error C2146: syntax error : missing ';' before identifier 'lpnm'
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(1360) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
g:\download_developer\___wtl___\samples\from_internet\unpack\mtluser.h(326) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<class cchildframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compi
led
g:\download_developer\___wtl___\samples\from_internet\unpack\childfrm.h(19) : see reference to class template instantiation 'MTL::CMDIChildWindowImplFixed<class cchildframe,2,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' bein
g compiled
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(277) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(1360) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
g:\download_developer\___wtl___\samples\from_internet\unpack\mtluser.h(326) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<class cchildframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compi
led
g:\download_developer\___wtl___\samples\from_internet\unpack\childfrm.h(19) : see reference to class template instantiation 'MTL::CMDIChildWindowImplFixed<class cchildframe,2,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' bein
g compiled
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(277) : error C2501: 'lpnm' : missing storage-class or type specifiers
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(1360) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
g:\download_developer\___wtl___\samples\from_internet\unpack\mtluser.h(326) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<class cchildframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compi
led
g:\download_developer\___wtl___\samples\from_internet\unpack\childfrm.h(19) : see reference to class template instantiation 'MTL::CMDIChildWindowImplFixed<class cchildframe,2,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' bein
g compiled
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(277) : error C2146: syntax error : missing ';' before identifier 'lpnm'
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(1116) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being compiled
g:\download_developer\___wtl___\samples\from_internet\unpack\mainfrm.h(12) : see reference to class template instantiation 'WTL::CMDIFrameWindowImpl<class cmainframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being comp
iled
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(277) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(1116) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being compiled
g:\download_developer\___wtl___\samples\from_internet\unpack\mainfrm.h(12) : see reference to class template instantiation 'WTL::CMDIFrameWindowImpl<class cmainframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being comp
iled
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(277) : error C2501: 'lpnm' : missing storage-class or type specifiers
f:\program files\microsoft platform sdk\src\wtl\include\atlframe.h(1116) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being compiled
g:\download_developer\___wtl___\samples\from_internet\unpack\mainfrm.h(12) : see reference to class template instantiation 'WTL::CMDIFrameWindowImpl<class cmainframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being comp
iled
Error executing cl.exe.
Donut.exe - 9 error(s), 0 warning(s)
|
|
|
|
|
Hello.
Donut requires the new SDK.
Anyway, the new SDK and WTL3.1 was released.
Plz wait for Donut2.x.
Thank you.
|
|
|
|
|
>> Donut requires the new SDK
Not necessarily.
Just comment out in stdafx.h:
#define _WIN32_IE 0x0501
and add in mainfrm.h around
void DisplayChevronMenu(_ChevronMenuInfo& cmi){...}
put:
#if (_WIN32_IE >= 0x0500)
#endif
|
|
|
|