-
-
[旧帖]
[求助]win32汇编的edit控件问题
0.00雪花
-
发表于:
2012-1-20 19:45
1328
-
[旧帖] [求助]win32汇编的edit控件问题
0.00雪花
win32汇编的edit控件问题
附上源码用radasm写的
源码部分
.386
.model flat,stdcall
option casemap:none
;--------------------------------------------------------------------------------
include windows.inc
include gdi32.inc
include kernel32.inc
include user32.inc
include comctl32.inc
includelib kernel32.lib
includelib user32.lib
includelib gdi32.lib
includelib comctl32.lib
;--------------------------------------------------------------------------------
IDD_DLG1 equ 1000
ID_EDIT equ 1
;--------------------------------------------------------------------------------
.data?
hInstance dd ?
hWinMain dd ?
.const
szEditClass db 'Edit',0
.code
_ProcDlgMain proc uses ebx esi edi hWnd,uMsg,wParam,lParam
mov eax,uMsg
.if eax==WM_CLOSE
invoke EndDialog,hWnd,0
.elseif eax==WM_INITDIALOG
push hWnd
pop hWinMain
invoke CreateWindowEx,WS_EX_CLIENTEDGE,offset szEditClass,NULL,\
WS_CHILD or WS_VISIBLE or ES_MULTILINE or ES_WANTRETURN or WS_VSCROLL or ES_AUTOHSCROLL,\
0,0,0,0,hWinMain,ID_EDIT,hInstance,NULL
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
ret
_ProcDlgMain endp
start:
invoke InitCommonControls
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke DialogBoxParam,hInstance,IDD_DLG1,NULL,offset _ProcDlgMain,NULL
invoke ExitProcess,0
end start
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!