现在全是加个toolbar就没了。但我想在上边加界面元素然后响应其事件。。
解决方案 »
- win32应用程序中怎样让第一个线程结束再起第二个线程?
- 他妈的薛黎明真丢人。
- 求助 vc版面分析算法
- 为什么在子线程中调用View中GetCaretPos得到的Point始终为(0,0)
- 高手请进:CSDN上暂时没有解决的问题:vc(or vb)+word!!!!!
- 送分啦,关于定时器
- 各位,使用ADO 是不是可以在二个不同的数据库建立一个连接然后.....
- 大家学习软件工程有什么心得?
- 调用ACCESS数据库的问题
- ado连接SQLServer是ListBox control不能显示数据库的信息
- ActiveX控件无法显示发行者
- 在vc弄语音识别时 加“sphelper.h”和“sapi.h” 出错 该怎么办
http://www.codeproject.com/KB/shell/IEToolbar.aspx
2Find Toolbar for IE - Yet Another Sample
http://www.codeproject.com/KB/shell/2find.aspx
http://www.xuebrothers.net/masterie/cn/superbar.html
HBRUSH CDialogCBB::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); // TODO: 在此更改 DC 的任何属性 // TODO: 如果默认的不是所需画笔,则返回另一个画笔
if(nCtlColor == CTLCOLOR_LISTBOX)
{
int ItemNum = m_Combo.GetCount();
int iWidth = 0;
CString strItem;
CClientDC dc(this);
int SaveDC = dc.SaveDC();
dc.SelectObject(GetFont());
int VSWidth = ::GetSystemMetrics(SM_CXVSCROLL);
for(int i = 0;i < ItemNum;i++)
{
m_Combo.GetLBText(i,strItem);
int WholeWidth = dc.GetTextExtent(strItem).cx + VSWidth;
iWidth = max(iWidth,WholeWidth);
}
dc.RestoreDC(SaveDC);
if(iWidth > 0)
{
CRect rc;
pWnd->GetWindowRect(&rc);
if(rc.Width() != iWidth)
{
rc.right = rc.left + iWidth;
pWnd->MoveWindow(&rc);
}
}
}
return hbr;
}