|
OK, I know this is simple, but can't figure it out ...
Deleting intermediate files and output files for project 'Donut - Win32 Release'.
--------------------Configuration: Donut - Win32 Release--------------------
Compiling resources...
Compiling...
stdafx.cpp
Compiling...
Donut.cpp
Linking...
LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Release/Donut.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Donut.exe - 2 error(s), 0 warning(s)
So, what am I overlooking in the settings?
Thanks much for the assistance.
KC
|
|
|
|
|
plz turn off ATL_MIN_CRT from predefined symbols, which you can find in build-options.
|
|
|
|
|
Hi:
You use "internetsetoption" function in your project to set the "offline browsing" mode of the webbrowser.But when i try to use this function to do so,VC gives out link errors about the function "internetsetoption",Can this function can be used in Win98?
|
|
|
|
|
Yes. The API itself works on IE3 or later.
VC could miss the help of the API.
|
|
|
|
|
|
I think it's not easy.
MS added the interface to Menu-APIs for drag-drop suppot,
but it's not OLE, which you have to implement.
|
|
|
|
|
can you think give me some hint for the interface MS added to Menu-APIs for drag-drop suppot.
such as some url or resource in MSDN.
|
|
|
|
|
I think it will be hard and
You should find the way to save the menu-order even if you'll get it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/menus_99df.asp
|
|
|
|
|
Right now i am creating a custom webbrowser using WebBorwser Control in my MDI application.
I open a new window in the seperate frame in the same application and it works fine.
But my problem is that i am unable to handle pop-up window properly all the time.
For normal cases it works fine,but for some sites (like www.raaga.com),the pop-up
window is not coming properly.
For finding whether this window is pop-up or not i am applying the following code
***********************
IWebBrowser2* pWB = NULL;
LPDISPATCH pDisp=GetApplication();
HRESULT hr = pDisp->QueryInterface( IID_IWebBrowser2,(void**)&pWB );
if ( SUCCEEDED(hr) )
{
VARIANT_BOOL IsMenuVisible;
*************// if menubar is not visible means it is pop-up wndow.
if((BOOL)IsMenuVisible==FALSE)
{
long Top=-500,Left=-500,Width=100,Height=100;
********// getting the dimensions of the pop-up window.But not coming properly all the times
pWB->get_Top(&Top);
pWB->get_Left(&Left);
pWB->get_Width(&Width);
pWB->get_Height(&Height);
(GetParentFrame())->MoveWindow(Left,Top,Width,Height);
}
********************************************************
So is it any other way or what to do for my implementation it works for all the times.
Thanx in advance.
|
|
|
|
|
I can't catch your problem exactly, but I think
you'd better stop navigating on OnNewWindow2 which means popups,
and navigate it in another WebBrowser Window in the frame of your application.
|
|
|
|
|
I've tried to compile the latest donut but I get the following errors:
Compiling...
Donut.cpp
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(275) : error C2146: syntax error : missing ';' before identifier 'lpnm'
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(875) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(275) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(875) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(275) : error C2501: 'lpnm' : missing storage-class or type specifiers
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(875) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
D:\_dev\_code\mtb\mtb2\mtlweb.h(371) : error C2065: 'SHACF_FILESYSTEM' : undeclared identifier
D:\_dev\_code\mtb\mtb2\mtlweb.h(371) : error C2065: 'SHACF_URLALL' : undeclared identifier
D:\_dev\_code\mtb\mtb2\mtlweb.h(371) : error C2065: 'SHACF_USETAB' : undeclared identifier
D:\_dev\_code\mtb\mtb2\mtlctrlw.h(1032) : error C2061: syntax error : identifier 'LPNMREBARCHEVRON'
D:\_dev\_code\mtb\mtb2\mtlctrlw.h(1099) : see reference to class template instantiation 'MTL::CCommandBarCtrl2Impl<t,tbase,twintraits>' being compiled
D:\_dev\_code\mtb\mtb2\mtlctrlw.h(1046) : error C2061: syntax error : identifier 'LPNMREBARCHEVRON'
D:\_dev\_code\mtb\mtb2\mtlctrlw.h(1099) : see reference to class template instantiation 'MTL::CCommandBarCtrl2Impl<t,tbase,twintraits>' being compiled
D:\_dev\_code\mtb\mtb2\mtlctrlw.h(1032) : error C2061: syntax error : identifier 'LPNMREBARCHEVRON'
D:\_dev\_code\mtb\mtb2\mtlctrlw.h(1102) : see reference to class template instantiation 'MTL::CCommandBarCtrl2Impl<class mtl::ccommandbarctrl2,class="" mtl::ccommandbarctrl2base,class="" atl::cwintraits<1442840576,0=""> >' being compiled
D:\_dev\_code\mtb\mtb2\mtlctrlw.h(1046) : error C2061: syntax error : identifier 'LPNMREBARCHEVRON'
D:\_dev\_code\mtb\mtb2\mtlctrlw.h(1102) : see reference to class template instantiation 'MTL::CCommandBarCtrl2Impl<class mtl::ccommandbarctrl2,class="" mtl::ccommandbarctrl2base,class="" atl::cwintraits<1442840576,0=""> >' being compiled
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(27) : error C2146: syntax error : missing ';' before identifier 'lpnm'
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(251) : see reference to class template instantiation 'CChevronHandler<t>' being compiled
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(27) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(251) : see reference to class template instantiation 'CChevronHandler<t>' being compiled
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(27) : error C2501: 'lpnm' : missing storage-class or type specifiers
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(251) : see reference to class template instantiation 'CChevronHandler<t>' being compiled
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(27) : error C2146: syntax error : missing ';' before identifier 'lpnm'
D:\_dev\_code\mtb\mtb2\FavTreeViewCtrl.h(321) : see reference to class template instantiation 'CChevronHandler<class cdonutfavoritesbarimpl<class="" cdonutfavoritesbar,class="" atl::cwindow,class="" atl::cwintraits<1442840576,0=""> > >' being compiled
D:\_dev\_code\mtb\mtb2\FavTreeViewCtrl.h(794) : see reference to class template instantiation 'CDonutFavoritesBarImpl<class cdonutfavoritesbar,class="" atl::cwindow,class="" atl::cwintraits<1442840576,0=""> >' being compiled
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(27) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
D:\_dev\_code\mtb\mtb2\FavTreeViewCtrl.h(321) : see reference to class template instantiation 'CChevronHandler<class cdonutfavoritesbarimpl<class="" cdonutfavoritesbar,class="" atl::cwindow,class="" atl::cwintraits<1442840576,0=""> > >' being compiled
D:\_dev\_code\mtb\mtb2\FavTreeViewCtrl.h(794) : see reference to class template instantiation 'CDonutFavoritesBarImpl<class cdonutfavoritesbar,class="" atl::cwindow,class="" atl::cwintraits<1442840576,0=""> >' being compiled
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(27) : error C2501: 'lpnm' : missing storage-class or type specifiers
D:\_dev\_code\mtb\mtb2\FavTreeViewCtrl.h(321) : see reference to class template instantiation 'CChevronHandler<class cdonutfavoritesbarimpl<class="" cdonutfavoritesbar,class="" atl::cwindow,class="" atl::cwintraits<1442840576,0=""> > >' being compiled
D:\_dev\_code\mtb\mtb2\FavTreeViewCtrl.h(794) : see reference to class template instantiation 'CDonutFavoritesBarImpl<class cdonutfavoritesbar,class="" atl::cwindow,class="" atl::cwintraits<1442840576,0=""> >' being compiled
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(27) : error C2146: syntax error : missing ';' before identifier 'lpnm'
D:\_dev\_code\mtb\mtb2\DonutToolBar.h(9) : see reference to class template instantiation 'CChevronHandler<class cdonuttoolbar="">' being compiled
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(27) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
D:\_dev\_code\mtb\mtb2\DonutToolBar.h(9) : see reference to class template instantiation 'CChevronHandler<class cdonuttoolbar="">' being compiled
D:\_dev\_code\mtb\mtb2\ChevronHandler.h(27) : error C2501: 'lpnm' : missing storage-class or type specifiers
D:\_dev\_code\mtb\mtb2\DonutToolBar.h(9) : see reference to class template instantiation 'CChevronHandler<class cdonuttoolbar="">' being compiled
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(275) : error C2146: syntax error : missing ';' before identifier 'lpnm'
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(1363) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
D:\_dev\_code\mtb\mtb2\mtluser.h(399) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<class cchildframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
D:\_dev\_code\mtb\mtb2\ChildFrm.h(19) : see reference to class template instantiation 'MTL::CMDIChildWindowImplFixed<class cchildframe,2,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(275) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(1363) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
D:\_dev\_code\mtb\mtb2\mtluser.h(399) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<class cchildframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
D:\_dev\_code\mtb\mtb2\ChildFrm.h(19) : see reference to class template instantiation 'MTL::CMDIChildWindowImplFixed<class cchildframe,2,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(275) : error C2501: 'lpnm' : missing storage-class or type specifiers
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(1363) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
D:\_dev\_code\mtb\mtb2\mtluser.h(399) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<class cchildframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
D:\_dev\_code\mtb\mtb2\ChildFrm.h(19) : see reference to class template instantiation 'MTL::CMDIChildWindowImplFixed<class cchildframe,2,class="" wtl::cmdiwindow,class="" atl::cwintraits<1456406528,64=""> >' being compiled
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(275) : error C2146: syntax error : missing ';' before identifier 'lpnm'
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(1119) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being compiled
D:\_dev\_code\mtb\mtb2\MainFrm.h(16) : see reference to class template instantiation 'WTL::CMDIFrameWindowImpl<class cmainframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being compiled
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(275) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(1119) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being compiled
D:\_dev\_code\mtb\mtb2\MainFrm.h(16) : see reference to class template instantiation 'WTL::CMDIFrameWindowImpl<class cmainframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being compiled
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(275) : error C2501: 'lpnm' : missing storage-class or type specifiers
d:\_DEV\_LIB\WTL\INCLUDE\atlframe.h(1119) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<class wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being compiled
D:\_dev\_code\mtb\mtb2\MainFrm.h(16) : see reference to class template instantiation 'WTL::CMDIFrameWindowImpl<class cmainframe,class="" wtl::cmdiwindow,class="" atl::cwintraits<114229248,262400=""> >' being compiled
Error executing cl.exe.
Donut.exe - 25 error(s), 0 warning(s)
I'm using wtl 3.1 and VC6 with sp5.
What am I doing wrong?
--
pomJ
|
|
|
|
|
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
|
|
|
|
|