内容:
使用Radasm设计生成一个对话框,实现如图1.1所示的四则运算计算器。
要求:
1.使用win32汇编实现。
2.编写GUI界面
.inc
include windows.inc
include kernel32.inc
include user32.inc
include Comctl32.inc
include shell32.inc
include masm32.inc
includelib kernel32.lib
includelib user32.lib
includelib Comctl32.lib
includelib shell32.lib
includelib masm32.lib
_atoi typedef proto :dword
DlgProc PROTO :HWND,:UINT,:WPARAM,:LPARAM
.const
IDD_DIALOG1 equ 101
ADD_BTN equ 1002
SUB_BTN equ 1014
MUL_BTN equ 1015
DIV_BTN equ 1016
ADD_EDIT1 equ 1001
ADD_EDIT2 equ 1010
ADD_RESULT equ 1017
SUB_EDIT1 equ 1007
SUB_EDIT2 equ 1011
SUB_RESULT equ 1018
MUL_EDIT1 equ 1008
MUL_EDIT2 equ 1012
MUL_RESULT equ 1019
DIV_EDIT1 equ 1009
DIV_EDIT2 equ 1013
DIV_RESULT equ 1020
;#########################################################################
.data
add1 sdword 0
sub1 sdword 0
mul1 sdword 0
div1 sdword 0
tip1 db 'the divisor can not allowed be 0',0
tipcaption db 'waringing!',0
tip_add1 db 'the operator of addition1 is wrong!',0
tip_add2 db 'the operator