.:: example_7.asm - DrawPicture ::.
;==========================================
; Пример использования функции DrawPicture
;==========================================
format PE
include "..\include\win32ax.inc"
include "..\include\const.inc"
x_size = 200
y_size = 150
x_coord = 100
y_coord = 100
start:
call Redraw
Wait_Event:
call [ WaitMessage]
call [ StdHandler]
jmp Wait_Event
Redraw:
invoke Draw_StdWindow, x_coord* 65536+y_coord,x_size* 65536+y_size, "Picture Demo", 00101b
mov [WinID],eax
mov esi,PicFile
mov edi,picfile
mov eax, 8
int 0x90
invoke DrawPicture, 20, 30,picfile,[WinID]
call [ End_of_redraw]
ret
data import
;
; Import functions:
;
library mx32, 'mx32.dll'
import mx32,\
WaitMessage, 'WaitMessage',\
Draw_Picture, 'Draw_Picture',\
Draw_StdWindow, 'Draw_StdWindow',\
StdHandler, 'StdHandler',\
End_of_redraw, 'End_of_redraw'
end data
section '.data' data readable writeable
WinID dd 0
PicFile db 'bio2.gif', 0 ; Имя загружаемой картинки
picfile rb 0x80000 ; Буффер с картинкой
|