如果遇到下面的問題
TBSTYLE_BUTTON TBSTYLE_AUTOSIZE
error C
error C
error C
error C
如果遇到下面問題
Linking
Creating library ReleaseUMinDependency/MotleyFool
LIBCMT
ReleaseUMinDependency/MotleyFool
Error executing link
MotleyFool
如果你自己重新編寫一個新的項目實現IE Toolbar的話
BEGIN_MSG_MAP(CToolbarWnd)
CHAIN_MSG_MAP_MEMBER(m_EditWnd)
MESSAGE_HANDLER(WM_CREATE
…
END_MSG_MAP()
BEGIN_MSG_MAP(CReflectWnd)
MESSAGE_HANDLER(WM_CREATE
CHAIN_MSG_MAP_MEMBER(m_ToolbarWnd)
END_MSG_MAP()
有非常詳細的開發步驟
創建CColimasBar類
public CComObjectRootEx
public CComCoClass
public IDeskBand
public IInputObject
public IObjectWithSite
public IDispatchImpl
創建CEditWnd類
public CWindowImpl
創建CReflectWnd類
public CWindowImpl
創建CToolbarWnd類
public CWindowImpl
修改Toolbar的Title
const WCHAR TITLE_CColimasBar[] = L
修改Button的Title
TCHAR* pCaption = _T(
增加Button點擊事件的Google Search處理函數GetValue
void CToolbarWnd::GetValue()
{
// if we have a web browser pointer then try to navigate to google site to retrieve search
if (m_pBrowser)
{
VARIANT vEmpty;
VariantInit(&vEmpty);
m_pBrowser
_bstr_t bsSite;
// if the user has entered url then append them to the edit
if (m_EditWnd
{
WCHAR *bstr = NULL;
m_EditWnd
UINT i= WideCharToMultiByte(CP_UTF
char *strB=new char[i];
WideCharToMultiByte (CP_UTF
UINT len=i;
char* tmp=new char[len*
tmp[
for(i=
byte j= (unsigned char)strB[i]; sprintf(tmp,"%s%%%x",tmp,j); //轉換為16進制。Tw.wINgWiT.coM
}
bsSite = L"-CNq=";
//Google Search字符串
bsSite += tmp;
bsSite += "rls=com.microsoft:en-USie=utf8oe=utf8";
SysFreeString(bstr);
delete[] strB;
}
else
bsSite = "";
// have the webrowser navigate to the site URL requested depending on user input.
m_pBrowser->Navigate(bsSite, &vEmpty, &vEmpty, &vEmpty, &vEmpty);
}
}
本文涉及到的所有知識請參照
From:http://tw.wingwit.com/Article/program/net/201311/12538.html