Salut, j'ai reussi a integrer des ressources dans fasm mais le probleme c'est que je ne trouve pas un exemple concret de code pour afficher une boite de dialogue
\\---------------------------
; DialogBox example
format PE GUI 4.0
entry start
include 'win32a.inc'
section '.data' data readable writeable
section '.code' code readable executable
start:
invoke GetModuleHandle,0
invoke DialogBoxParam,eax,37,HWND_DESKTOP,DialogProc,0
or eax,eax
jz exit
exit:
invoke ExitProcess,0
proc DialogProc hwnddlg,msg,wparam,lparam
push ebx esi edi
cmp [msg],WM_INITDIALOG
je wminitdialog
cmp [msg],WM_COMMAND
je wmcommand
cmp [msg],WM_CLOSE
je wmclose
xor eax,eax
jmp finish
wminitdialog:
jmp processed
wmcommand:
cmp [wparam],BN_CLICKED shl 16 + IDCANCEL
je wmclose
cmp [wparam],BN_CLICKED shl 16 + IDOK
jne processed
wmclose:
invoke EndDialog,[hwnddlg],0
processed:
mov eax,1
finish:
pop edi esi ebx
ret
endp
section '.idata' import data readable writeable
library kernel,'KERNEL32.DLL',\
user,'USER32.DLL'
import kernel,\
GetModuleHandle,'GetModuleHandleA',\
ExitProcess,'ExitProcess'
import user,\
DialogBoxParam,'DialogBoxParamA',\
EndDialog,'EndDialog'
section '.rsrc' resource from 'C:\\fasmw165\\EXAMPLES\\DIALOG\\aa.res' data readable
\\--------------------------------------------
si quelqun sai comment on fait qu'il n'esite pas a me contacter.