1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| push dword hdc ; adresse PAINTSTRUCT
push dword [WP1_hWnd] ; handle fenêtre
call [BeginPaint]
mov dword [hdcDestination], eax ; on récupère le handle periph affichage
;================================================================================
push dword TS1Bitmap ; adresse du bitmap
push dword [hInstance] ; ID application
call [LoadBitmapA]
push eax ; on sauvegarde le handle du bitmap
;================================================================================
push dword [hdcDestination] ; on passe le handle bitmap et le
; handle périph d'affichage
; comme arguments à la fonction
; createCompatibleDC
call [CreateCompatibleDC]
mov dword [hdcSource], eax ; on récupère le handle periph mémoire
;================================================================================
]push dword [hdcSource] ; arg=handle periph mémoire et bitmap
; (déjà empilé à la ligne 12)
call [SelectObject] ; ???
;================================================================================
; BitBlt : transfère un bloc de données couleurs vers un rectangle de pixel
; à partir d'un périph source spécifié vers un périph destination
;================================================================================
push dword 00CC0020h ; arg fonction
push dword 0h ; arg fonction
push dword 0h ; arg fonction
push dword [hdcSource] ; handle de périph mémoire
push dword 39 ; arg fonction
push dword 100 ; arg fonction
push dword 0h ; arg fonction
push dword 0h ; arg fonction
push dword [hdcDestination] ; handle pérpiph affichage
call [BitBlt] ; et on appele la fonction BitBlt
;================================================================================
push dword [hdcSource] ; suppression des handles obsolètes
call [DeleteDC] ; et fin de routine
pop eax
push eax
call [DeleteObject]
push dword hdc
push dword [WP1_hWnd]
call [EndPaint] |
Partager