Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .386
- .model flat, stdcall ;32 bit memory model
- option casemap :none ;case sensitive
- include Moj pierwszy.inc
- .data
- szMessageHeader db "Krzywy",0
- szMessageText db "Zakonczyc?",0
- .code
- start:
- invoke GetModuleHandle,NULL
- mov hInstance,eax
- invoke InitCommonControls
- invoke DialogBoxParam,hInstance,IDD_MAIN,NULL,addr DlgProc,NULL
- invoke ExitProcess,0
- ;########################################################################
- DlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
- mov eax,uMsg
- .if eax==WM_INITDIALOG
- ;initialization here
- .elseif eax==WM_COMMAND
- mov edx,wParam
- movzx eax,dx
- shr edx,16
- .if edx==BN_CLICKED
- .if eax==IDOK
- jmp Procka
- .elseif eax==IDCANCEL
- invoke SendMessage,hWin,WM_CLOSE,NULL,NULL
- .endif
- .endif
- .elseif eax==WM_CLOSE
- invoke EndDialog,hWin,0
- .else
- mov eax,FALSE
- ret
- .endif
- mov eax,TRUE
- ret
- DlgProc endp
- Procka:
- invoke MessageBox, NULL, addr szMessageText, addr szMessageHeader,MB_OKCANCEL
- .if eax==01h
- invoke ExitProcess,NULL
- .endif
- .if eax==02h
- jmp start
- .endif
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement