- UID
- 2198
注册时间2005-6-29
阅读权限255
最后登录1970-1-1
副坛主
该用户从未签到
|
.586
.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
IDD_DLG equ 1000
IDC_NAME equ 1001
IDC_OK equ 1002
IDC_EDT equ 1003
IDC_CODE equ 1004
IDC_EDT1 equ 1005
IDC_TEXT equ 1006
.data
hInstance dd ?
szCaption db "Nisy!",0
szText db "CodeLength is : %d ",0dh,0ah
db "The Code is : %s ",0
.data?
szBuffer db 256 dup (?)
szBufferName db 256 dup (?)
szBufferCode db 256 dup (?)
nNameLength dd ?
nCodeLength dd ?
.code
_IsRegistered proc hWnd
invoke GetDlgItemText,hWnd,IDC_NAME,offset szBufferName,256
invoke GetDlgItemText,hWnd,IDC_CODE,offset szBuffer,256
MOV nNameLength,eax
invoke wsprintf,offset szBufferCode,offset szText,nNameLength,offset szBuffer
invoke MessageBox,hWnd,offset szBufferCode,offset szBufferName,MB_YESNO
ret
_IsRegistered endp
_ProcDlgMain proc uses ebx edi esi hWnd,wMsg,wParam,lParam
MOV EAX,wMsg
.if EAX == WM_CLOSE
invoke EndDialog,hWnd,NULL
.elseif EAX == WM_INITDIALOG
.elseif EAX == WM_COMMAND
MOV EAX,wParam
MOVZX EAX,AX
.IF EAX == IDC_OK
invoke _IsRegistered,hWnd
.endif
.else
MOV EAX,FALSE
RET
.ENDIF
MOV EAX,TRUE
RET
_ProcDlgMain endp
start: invoke GetModuleHandle,NULL
mov hInstance,eax
invoke DialogBoxParam,hInstance,IDD_DLG,NULL,_ProcDlgMain,NULL
invoke ExitProcess,NULL
end start
随便写着玩的 欢迎大家多写CM来玩 ~~ |
|