易语言窗口画线改进源码
系统结构:NewWndProc,画平滑曲线,画直线组,GdiPlus初始化,GdiPlus销毁,复制内存DC到窗口,GdiplusShutdown,GdiplusStartup,GdipCreateFromHWND,GdipDeleteGraphics,GdipCreatePen1,GdipDeletePen,GdipDrawCurve3,GdipDrawLines,GdipSetSmoothingMode,GetClientRect,GetDC,ReleaseDC,DeleteDC,CreateCompatibleBitmap,SelectObject,BitBlt,GdipCreateFromHDC,CreateCompatibleDC,SetWindowLong,CallWindowProc,DeleteObject,
======窗口程序集1
| |
| |------ __启动窗口_创建完毕
| |
| |------ __启动窗口_将被销毁
| |
| |------ NewWndProc
| |
| |------ _按钮2_被单击
| |
| |------ 画平滑曲线
| |
| |------ 画直线组
| |
| |------ GdiPlus初始化
| |
| |------ GdiPlus销毁
| |
| |------ 复制内存DC到窗口
| |
| |
======调用的Dll
| |
| |---[dll]------ GdiplusShutdown
| |
| |---[dll]------ GdiplusStartup
| |
| |---[dll]------ GdipCreateFromHWND
| |
| |---[dll]------ GdipDeleteGraphics
| |
| |---[dll]------ GdipCreatePen1
| |
| |---[dll]------ GdipDeletePen
| |
| |---[dll]------ GdipDrawCurve3
| |
| |---[dll]------ GdipDrawLines
| |
| |---[dll]------ GdipSetSmoothingMode
| |
| |---[dll]------ GetClientRect
| |
| |---[dll]------ GetDC
| |
| |---[dll]------ ReleaseDC
| |
| |---[dll]------ DeleteDC
| |
| |---[dll]------ CreateCompatibleBitmap
| |
| |---[dll]------ SelectObject
| |
| |---[dll]------ BitBlt
| |
| |---[dll]------ GdipCreateFromHDC
| |
| |---[dll]------ CreateCompatibleDC
| |
| |---[dll]------ SetWindowLong
| |
| |---[dll]------ CallWindowProc
| |
| |---[dll]------ DeleteObject
调用的DLL命令:
.DLL命令 GdiplusShutdown, 整数型, "gdiplus", "GdiplusShutdown"
.参数 token, 整数型
.DLL命令 GdiplusStartup, 整数型, "gdiplus", "GdiplusStartup"
.参数 token, 整数型, 传址
.参数 inputbuf, GdiplusStartupInput
.参数 outputbuf, 整数型
.DLL命令 GdipCreateFromHWND, 整数型, "gdiplus", "GdipCreateFromHWND"
.参数 hWnd
.参数 graphics, , 传址
.DLL命令 GdipDeleteGraphics, 整数型, "gdiplus", "GdipDeleteGraphics"
.参数 graphics
.DLL命令 GdipCreatePen1, 整数型, "gdiplus", "GdipCreatePen1", , ARGB color, REAL width, GpUnit unit, GpPen **pen
.参数 color
.参数 width, 小数型
.参数 unit
.参数 pen, , 传址
.DLL命令 GdipDeletePen, 整数型, "gdiplus", "GdipDeletePen", , GdipDeletePen(GpPen *pen);
.参数 pen
.DLL命令 GdipDrawCurve3, 整数型, "gdiplus", "GdipDrawCurve3"
.参数 graphics
.参数 pen
.参数 points, POINTF, 数组
.参数 count
.参数 offset
.参数 numberOfSegments
.参数 tension, 小数型
.DLL命令 GdipDrawLines, 整数型, "gdiplus", "GdipDrawLines"
.参数 graphics
.参数 pen
.参数 points, POINTF, 数组
.参数 count
.DLL命令 GdipSetSmoothingMode, , "gdiplus", "GdipSetSmoothingMode"
.参数 graphics
.参数 n
.DLL命令 GetClientRect, 整数型, "user32", "GetClientRect", , 返回指定窗口客户区矩形的大小 非零表示成功,零表示失败。会设置GetLastError
.参数 hwnd, 整数型, , 欲计算大小的目标窗口
.参数 lpRect, RECT, , RECT,指定一个矩形,用客户区域的大小载入(以像素为单位);
.DLL命令 GetDC, 整数型, "user32", "GetDC", , 获取指定窗口的设备场景 指定窗口的设备场景句柄,出错则为0
.参数 hwnd, 整数型, , 将获取其设备场景的窗口的句柄。若为0,则要获取整个屏幕的DC;
.DLL命令 ReleaseDC, 整数型, "user32", "ReleaseDC", , 释放由调用GetDC或GetWindowDC函数获取的指定设备场景。它对类或私有设备场景无效(但这样的调用不会造成损害) 执行成功为1,否则为0
.参数 hwnd, 整数型, , 要释放的设备场景相关的窗口句柄
.参数 hdc, 整数型, , 要释放的设备场景句柄;
.DLL命令 DeleteDC, 整数型, "gdi32", "DeleteDC", , 删除专用设备场景或信息场景,释放所有相关窗口资源。不要将它用于GetDC函数取回的设备场景 执行成功则为非零,失败则为零
.参数 hdc, 整数型, , 将要删除的设备场景 在vb里使用不要将它用于由vb hdc属性获取的设备场景句柄;
.DLL命令 CreateCompatibleBitmap, 整数型, "gdi32.dll", "CreateCompatibleBitmap"
.参数 hdc, 整数型
.参数 nWidth, 整数型
.参数 nHeight, 整数型
.DLL命令 SelectObject, 整数型, , "SelectObject"
.参数 hdc, 整数型
.参数 hObject, 整数型
.DLL命令 BitBlt, 整数型, "gdi32.dll", "BitBlt"
.参数 hDestDC, 整数型
.参数 x, 整数型
.参数 y, 整数型
.参数 nWidth, 整数型
.参数 nHeight, 整数型
.参数 hSrcDC, 整数型
.参数 xSrc, 整数型
.参数 ySrc, 整数型
.参数 dwRop, 整数型
.DLL命令 GdipCreateFromHDC, 整数型, "GdiPlus.dll", "GdipCreateFromHDC"
.参数 hdc, 整数型
.参数 graphics, 整数型, 传址
.DLL命令 CreateCompatibleDC, 整数型, "gdi32.dll", "CreateCompatibleDC"
.参数 hdc, 整数型
.DLL命令 SetWindowLong, 整数型, "user32", "SetWindowLongA"
.参数 hWnd, 整数型
.参数 nIndex, 整数型
.参数 dwNewLong, 整数型
.DLL命令 CallWindowProc, 整数型, "user32", "CallWindowProcA"
.参数 lpPrevWndFunc, 整数型
.参数 hWnd, 整数型
.参数 Msg, 整数型
.参数 wParam, 整数型
.参数 lParam, 整数型
.DLL命令 DeleteObject, 整数型, "gdi32"
.参数 hObject, 整数型
注:本站源码主要来源于网络收集。如有侵犯您的利益,请联系我们,我们将及时删除!
部分源码可能含有危险代码,(如关机、格式化磁盘等),请看清代码在运行。
由此产生的一切后果本站均不负责。源码仅用于学习使用,如需运用到商业场景请咨询原作者。
使用本站源码开发的产品均与本站无任何关系,请大家遵守国家相关法律。