如何 重画 vc的 菜单的外边线 和 列表框的外边线 如何 重画 vc的 菜单的外边线 整个menu的外部的边线和 列表框的外边线谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 void xxxMenu::DrawItemBorder(LPDRAWITEMSTRUCT lpdis){ CRect rItem(lpdis->rcItem); CDC* pDC = CDC::FromHandle(lpdis->hDC); pDC->FillSolidRect(CRect(rItem.left - 1, rItem.top, rItem.left, rItem.bottom), crShadow); pDC->FillSolidRect(CRect(rItem.right - 1, rItem.top, rItem.right, rItem.bottom), crShadow);}void xxxMenu::DrawItem(LPDRAWITEMSTRUCT lpdis){ CPaintDC dc(this); // device context for painting // prepare dc dc.SelectObject(GetFont()); DRAWITEMSTRUCT dis; dis.CtlType = ODT_MENU; dis.CtlID = GetDlgCtrlID(); dis.hwndItem = GetSafeHwnd(); dis.hDC = dc.GetSafeHdc(); dis.itemAction = ODA_DRAWENTIRE; // draw the rest of the border CRect rClient, rPage; GetClientRect(&dis.rcItem); rPage = dis.rcItem; AdjustRect(FALSE, rPage); dis.rcItem.top = rPage.top - 2; DrawMainBorder(&dis); // paint the tabs first and then the borders int nTab = GetItemCount(); int nSel = GetCurSel(); // now selected tab dis.itemID = nSel; dis.itemState = ODS_SELECTED; VERIFY(GetItemRect(nSel, &dis.rcItem)); dis.rcItem.bottom += 2; dis.rcItem.top -= 2; DrawItem(&dis); DrawItemBorder(&dis);} DrawMainBorder(&dis); 里面的 呢 ?好像这个代码里面没有 麻烦了 好像 在这个drwawitem使用 GetClientRect不可以得到 rect? 谢谢指教 如何让用户自己选择图片更改对话框底部背景图片。。 vs 2010 如何快速切换到对应的资源视图 API程序运行错误 求助:类似于IE7那样的形式浏览器实现 请问strcmp的问题 高手末入 紧急求助!!各位大哥大姐帮忙看看!!谢谢 新建的UDP客户端对话框打开就卡死了,求高手解答 【求助】关于围绕画中心划圆问题,谢谢。 救命~!!!服务器总过20分钟左右就出现CPU占用60%以上,导致系统忙,必须重启才能恢复,为什么 各位大侠救命啊,一个简单的MFC视图切换问题。 有關 GetLastError(VOID) 問題 请问如何才能获取网页里applet中的数据?
{
CRect rItem(lpdis->rcItem);
CDC* pDC = CDC::FromHandle(lpdis->hDC); pDC->FillSolidRect(CRect(rItem.left - 1, rItem.top, rItem.left, rItem.bottom), crShadow);
pDC->FillSolidRect(CRect(rItem.right - 1, rItem.top, rItem.right, rItem.bottom), crShadow);
}void xxxMenu::DrawItem(LPDRAWITEMSTRUCT lpdis)
{
CPaintDC dc(this); // device context for painting
// prepare dc
dc.SelectObject(GetFont());
DRAWITEMSTRUCT dis;
dis.CtlType = ODT_MENU;
dis.CtlID = GetDlgCtrlID();
dis.hwndItem = GetSafeHwnd();
dis.hDC = dc.GetSafeHdc();
dis.itemAction = ODA_DRAWENTIRE;
// draw the rest of the border
CRect rClient, rPage;
GetClientRect(&dis.rcItem);
rPage = dis.rcItem;
AdjustRect(FALSE, rPage);
dis.rcItem.top = rPage.top - 2;
DrawMainBorder(&dis);
// paint the tabs first and then the borders
int nTab = GetItemCount();
int nSel = GetCurSel();
// now selected tab
dis.itemID = nSel;
dis.itemState = ODS_SELECTED;
VERIFY(GetItemRect(nSel, &dis.rcItem));
dis.rcItem.bottom += 2;
dis.rcItem.top -= 2;
DrawItem(&dis);
DrawItemBorder(&dis);
}
里面的 呢 ?
好像这个代码里面没有
麻烦了
? 谢谢指教