win32汇编环境,窗口程序中对按钮控件常用操作的示例
;运行效果
;win32汇编环境,窗口程序中对按钮控件常用操作的示例
;常用的操作,例如创建按钮控件,使其无效,改变文本,得到文本等。
;将代码复制进radasm软件里,直接就可以编译运行。重点部分加备注。
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.386
.model flat,stdcall
option casemap:none
include windows.inc
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.lib
include gdi32.inc
includelib gdi32.lib
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
WinMain proto :DWORD,:DWORD,:DWORD,:DWORD
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.DATA
ClassName db "SimpleWinClass",0
AppName db "窗口程序的框架",0
szButtonClassName db "button",0 ;按钮类名
sz_FontName db "宋体 ",0
szTitle db "提示",0
szButtonTitle db "我是被测试的按钮",0
szButtonTitle10 db "我是改变后的文字",0
szButtonTitle11 db "第1个按钮是有效的",0
szButtonTitle12 db "第1个按钮是无效的",0
szButtonTitle01 db "改变第1个按钮的文字",0
szButtonTitle02 db "得到第1个按钮的文字",0
szButtonTitle03 db "使第1个按钮无效",0
szButtonTitle04 db "使第1个按钮有效",0
szButtonTitle05 d