簡單的表單透明樣本 fasm 彙編

來源:互聯網
上載者:User
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>; Fasm AlphaWin.asm; 簡單的表單透明樣本  by G-Spider;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>; 使用下列命令進行編譯:; fasm AlphaWin.asm AlphaWin.exe;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>UNICODE equ TRUE   ;ASCII或UNICODE (FALSE or TRUE)match =FALSE, UNICODE {include 'win32a.inc'}match =TRUE, UNICODE {include 'win32w.inc'};>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>format PE GUI 4.0entry startsection '.text' code readable writeable executable  start:     invoke GetModuleHandle,0     mov [wc.hInstance],eax     ;客戶區使用黒色畫刷     invoke GetStockObject,BLACK_BRUSH     mov [wc.hbrBackground],eax     invoke RegisterClass,wc     test eax,eax     jz end_loop     ;圖層樣式表單WS_EX_LAYERED     invoke CreateWindowEx,WS_EX_LAYERED,szClass,szTitle,\            WS_VISIBLE+WS_SYSMENU,\            100,100,600,400,NULL,NULL,[wc.hInstance],NULL     test eax,eax     jz end_loop     ;黒色設為全透明色,其他顏色的透明度設為200 (範圍:0~255).      invoke SetLayeredWindowAttributes,eax,0,200,LWA_ALPHA + LWA_COLORKEY  msg_loop:     invoke GetMessage,msg,NULL,0,0     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;---------------------------------------------------------------------     msg     MSG     szClass TCHAR 'FASMWIN32',0     szTitle TCHAR 'Alpha windows',0     wc      WNDCLASS 0,WindowProc,0,0,NULL,NULL,NULL,\             COLOR_WINDOW + 1,NULL,szClass                  szfmt   TCHAR 'MsgTableLen',0Dh,0Ah,'= %X',0     lpBuf   rb 16;---------------------------------------------------------------------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'
效果:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.