;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Windowproc proto :HWND,:UINT,:WPARAM,:LPARAM
GetRegistKey proto
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.data
String db 'Keygen For flhxt [DFCG] [BCG] ',0dh,0ah
db ' Designed by flhxt ',0dh,0ah
db ' Web: www.chinadfcg.com ',0dh,0ah
db '我很笨,他妈的,不知怎出出中文',0dh,0ah
db ' ========================== ',0dh,0ah,0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;滚动字幕
hDc DWORD ?
hMemoryDc1 DWORD ?
hMemoryDc2 DWORD ?
hBrush DWORD ?
TextOutX DWORD ?
TextOutY DWORD ?
TextOutCY DWORD ?
LogFont LOGFONT <?>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.code
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Windowproc PROC hWin:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
LOCAL hBitMapMDc:HDC
LOCAL ps:PAINTSTRUCT
LOCAL rect:RECT
LOCAL TextSizeCX:dword
LOCAL TextSizeCY:dword
mov eax,uMsg
.if eax == WM_PAINT
invoke BeginPaint,hWin,addr ps
mov hDc,eax
Color 0,0,0
invoke BitBlt,hDc,0h,0h,100h,40h,hMemoryDc1,0,0,eax ;将全黑位图从设备场景hMemoryDc1复制到hDc
invoke EndPaint,hWin,addr ps
.elseif eax == WM_INITDIALOG
;----------------------------------------------------------- ;==实现滚动字幕==
invoke SetTimer,hWin,200h,45h,NULL
invoke GetDC,hWin
mov hDc,eax
invoke CreateCompatibleDC,hDc ;创建作为大背景的内存设备环境
mov hMemoryDc1,eax
invoke CreateCompatibleBitmap,hDc,100h,40h ;创建位图,以供内存设备环境调用作大背景
mov hBitMapMDc,eax
invoke SelectObject,hMemoryDc1,hBitMapMDc ;选入刚创建的位图到内存设备环境
Color 0,0,0 ;设置画刷的颜色
invoke CreateSolidBrush,eax
mov hBrush,eax
mov rect.top,0h ;设置矩形大小
mov rect.left,0h
mov rect.right,100h
mov rect.bottom,100h
invoke FillRect,hMemoryDc1,addr rect,hBrush ;用画刷以矩形大小填充内大背景
invoke DeleteObject,hBrush
invoke CreateCompatibleDC,hDc ;创建一个带文字的内存设备
mov hMemoryDc2,eax
Color 0,255,255 ;设置字体颜色
invoke SetTextColor,hMemoryDc2,eax
invoke SetBkMode,hMemoryDc2,TRANSPARENT ;指定空隙的填充方式-TRANSPARENT-透明处理
invoke CreateFontIndirect,addr LogFont ;创建可以被选入的文字
invoke SelectObject,hMemoryDc2,eax
invoke CreateCompatibleBitmap,hDc,100h,80h ;可显示的文字范围
invoke SelectObject,hMemoryDc2,eax
Color 0,0,0 ;@1--设置画刷的颜色
invoke CreateSolidBrush,eax
mov hBrush,eax
mov rect.top,0h ;设置矩形大小
mov rect.left,0h
mov rect.right,100h
mov rect.bottom,100h
invoke FillRect,hMemoryDc2,addr rect,hBrush ;填充文字背景,单色时,从@1到这里的代码可以不用
invoke DeleteObject,hBrush
mov TextOutX,22h
mov TextOutY,30h
lea esi,String
mov al,byte ptr [esi]
.while al
.if al == 0dh
add TextOutY,10h ;设置行间距
mov TextOutX,22h ;换行
add esi,2h
.else
invoke GetTextExtentPoint32,hMemoryDc2,esi,1,addr TextSizeCX
invoke TextOut,hMemoryDc2,TextOutX,TextOutY,esi,1h
mov eax,TextSizeCX
add TextOutX,eax
inc esi
.endif
mov al,byte ptr [esi]
.endw
invoke ReleaseDC,hWin,hDc
.elseif eax == WM_TIMER
invoke GetDC,hWin
mov hDc,eax
invoke BitBlt,hMemoryDc1,0h,8h,100h,40h,hMemoryDc2,0,TextOutCY,0cc0020h
inc TextOutCY
.if TextOutCY == 70h
mov TextOutCY,0
.endif
invoke BitBlt,hDc,0h,0h,100h,38h,hMemoryDc1,0,0,0cc0020h
invoke ReleaseDC,hWin,hDc
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课