用Win32实现类似MFC中Draw3dRect函数的功能!清高手指点!
解决方案 »
- 想做一个微软的画图那样的打印功能,将大图片精确缩小到一页纸打印
- 打印问题->如何在不同dpi下在A4上打印实际大小(宽,高)相同的线框~~~~~
- 如何设置单选按钮的图片
- 为什么不能马上显示无模式编辑框中的字符?
- VC的问题,帮帮忙
- 如何扩展IE,让他显示我的3D文件中的图像
- ListView选中一项后发送什么消息给父窗口呢?
- 学VC好难呀,有高手请指教一下吧!!!!!
- windows创建的线程为什么先创建的线程的入口函数有时会比晚创建的线程的入口函数后执行?
- 如何关闭一个视图?用OnClose()?????
- 创建一个WIN32 application后,我想使用MFC中CWinThread该怎么办?
- 程序没有关闭,只是鼠标移动到任务栏上,因为这个时候有个文本提示框盖住了程序的界面,程序就刷新了,怎么防止这情况
void Draw3dRect( LPCRECT lpRect, COLORREF clrTopLeft, COLORREF clrBottomRight );void Draw3dRect( int x, int y, int cx, int cy, COLORREF clrTopLeft, COLORREF clrBottomRight );ParameterslpRectSpecifies the bounding rectangle (in logical units). You can pass either a pointer to a RECT structure or a CRect object for this parameter.clrTopLeftSpecifies the color of the top and left sides of the three-dimensional rectangle.clrBottomRightSpecifies the color of the bottom and right sides of the three-dimensional rectangle.xSpecifies the logical x-coordinate of the upper-left corner of the three-dimensional rectangle.ySpecifies the logical y-coordinate of the upper-left corner of the three-dimensional rectangle.cxSpecifies the width of the three-dimensional rectangle.cySpecifies the height of the three-dimensional rectangle.不和MFC一样画吗
不都要通过绘图环境CDC画的吗
{
::SetBkColor(hdc, clr);
RECT rect;
rect.left=x;
rect.top=y;
rect.right=x+cx;
rect.bottom=y+cy;
::ExtTextOut(hdc, 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL);
}void Draw3dRect(HDC hdc,int x, int y, int cx, int cy,
COLORREF clrTopLeft, COLORREF clrBottomRight)
{
FillSolidRect(hdc,x, y, cx - 1, 1, clrTopLeft);
FillSolidRect(hdc,x, y, 1, cy - 1, clrTopLeft);
FillSolidRect(hdc,x + cx, y, -1, cy, clrBottomRight);
FillSolidRect(hdc,x, y + cy, cx, -1, clrBottomRight);
}
void Draw3dRect(HDC hdc,RECT* lpRect,
COLORREF clrTopLeft, COLORREF clrBottomRight)
{
Draw3dRect(hdc,lpRect->left, lpRect->top, lpRect->right - lpRect->left,
lpRect->bottom - lpRect->top, clrTopLeft, clrBottomRight);
}