win32汇编环境,在窗口程序中画五边形与六边形
;运行效果
;win32汇编环境,在窗口程序中画五边形与六边形
;展示五边形与六边形的画法
;将代码复制进radasm软件里,直接编译可运行.重要部分加备注。
;下面为asm文件
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.386
.model flat,stdcall
option casemap:none
include windows.inc
include user32.inc
include kernel32.inc
include gdi32.inc
includelib kernel32.lib
includelib user32.lib
includelib gdi32.lib
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
WinMain proto :DWORD,:DWORD,:DWORD,:DWORD
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.DATA
ClassName db "SimpleWinClass",0
AppName db "窗口程序的模版",0
@Polygon01 dd 5 dup (50,100, 100,100, 115,53, 75,24, 35,53) ;画五边形的坐标,按逆时针的五个点的坐标比例大概是(100,100)(150,100)(165,53)(125,24)(85,53),可以以此推论出各坐标点
@Polygon02 dd 5 dup (150,100, 200,100, 215,53, 175,24, 135,53)
@Polygon03 dd 6 dup (30,1