Advertisement
Guest User

333344

a guest
Oct 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Пример диалогового окна (в случае нажатия Yes, открывает ещё одно окно)
  2.  
  3. include '%fasm%\win32ax.inc'
  4. section '.code' code readable executable
  5. start:
  6. invoke MessageBox,NULL,lpText,lpCaption,\
  7. MB_YESNO+MB_ICONQUESTION
  8. cmp eax,IDYES
  9. jne exit
  10. invoke MessageBox,NULL,lpText,lpCaption,\
  11. MB_OK
  12. exit:
  13. invoke ExitProcess,0
  14. section '.data' data readable writeable
  15. lpText db 'Text',0
  16. lpCaption db 'Caption',0
  17. data import
  18. library kernel32,'KERNEL32.DLL',\
  19. user32,'USER32.DLL'
  20. import kernel32,ExitProcess,'ExitProcess'
  21. import user32,MessageBox,'MessageBoxA'
  22. end data
  23. Код:
  24. start:
  25. invoke MessageBox,NULL,'Text','Caption',\
  26. MB_YESNO+MB_ICONQUESTION\
  27. +MB_RIGHT+MB_DEFBUTTON2
  28. cmp eax,IDYES
  29. jne exit
  30.  
  31. invoke MessageBox,NULL,'Caption','Text',\
  32. MB_OKCANCEL+MB_ICONQUESTION\
  33. +MB_SETFOREGROUND+MB_RTLREADING
  34. cmp eax,IDYES
  35. jne exit
  36.  
  37. invoke MessageBox,NULL,'...','...',\
  38. MB_OK+MB_ICONEXCLAMATION
  39.  
  40. exit:
  41. invoke ExitProcess,0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement