>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>; FASM alphawin. ASM; simple Form transparency example by G-spider; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>; use the following command to compile:; FASM alphawin. ASM alphawin.exe; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>> unicode equ true; ascii or Unicode (false or true) match = false, Unicode {include 'win32a. INC '} match = true, uni Code {include 'win32w. INC '>;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> format pe gui 4.0 entry startsection '. text 'Code readable writeable executable start: invoke getmodulehandle, 0 mov [WC. hinstance], eax; in the customer zone, invoke getstockobject, black_brush mov [WC. hbrbackground], eax invoke registerclass, WC test eax, eax JZ end_loop; layer style form ws_ex_layered invoke create1_wex, ws_ex _ Layered, szclass, sztitle, \ ws_visible + ws_sysmenu, \ 100,100,600,400, null, null, [WC. hinstance], null test eax, eax JZ end_loop; fill color is set to full transparency, transparency of other colors is set to 200 (range: 0 ~ 255 ). invoke success, eax, 0,200, lwa_alpha + invoke msg_loop: invoke getmessage, MSG, null, or eax, eax JZ end_loop invoke translatemessage, MSG invoke dispatchmessage, msg jmp msg_loop end_loop: invoke exitprocess, [MSG. wparam] Proc windowproc uses ebx esi edi, hwnd, umsg, wparam, lparam CMP [umsg], wm_destroy je. wmdestroy. defwndproc: invoke defwindowproc, [hwnd], [umsg], [wparam], [lparam] JMP. finish. wmdestroy: invoke postquitmessage, 0 XOR eax, eax. finish: retendp; optional MSG szclass tchar 'fasmwin32 ', 0 sztitle tchar 'Alpha Windows', 0 WC wndclass 0, windowproc, 0, 0, null, \ color_window + 1, null, szclass szfmt tchar 'msgtablelen', 0dh, 0ah, '= % x', 0 lpbuf RB 16; invalid section '. idata 'import data readable writeable library Kernel32, 'kernel32. dll ', \ USER32, 'user32. dll ', \ GDI32, 'gdi32. DLL 'include 'API \ kernel32.inc 'include' API \ user32.inc 'include 'API \ gdi32.inc'
Effect: