Jump to content
Tuts 4 You

[HELP!] Keygen About Dialog


DeRoX

Recommended Posts

Posted (edited)

hey community,

i need some help in ASM. I use a keygen template from UFO-Pu55y. I modified it a little bit for a about button to show a new window with a text in a bitmap. my problem is to get the cursor animation same like the main window. If the about dialog pops up the mouse cursor is changing to normal. i'm sitting here for 4 hours and i don't get it to work. :confused:

About proc hWnd:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORDlocal ps:PAINTSTRUCT.if uMsg == WM_INITDIALOG
invoke SetWindowPos,hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE + SWP_NOSIZE
invoke LoadPng,1501,addr sizeAbout
mov hAboutBg,eax
invoke CreatePatternBrush,hAboutBg
mov hAboutBrush,eax
invoke CreateFontIndirect,addr AboutFont
mov hFont,eax
invoke GetDlgItem,hWnd,ID_NFO
invoke SendMessage,eax,WM_SETFONT,hFont,0
invoke SetDlgItemText,hWnd,ID_NFO,addr AboutText
.elseif uMsg == WM_CTLCOLORDLG
return hAboutBrush
.elseif uMsg == WM_CTLCOLORSTATIC
invoke SetBkMode,wParam,TRANSPARENT
invoke SetTextColor,wParam,00FFFFFFh
invoke SetBkColor,wParam,0h
invoke GetStockObject,NULL_BRUSH
ret
.elseif uMsg == WM_PAINT
invoke BeginPaint,hWnd,addr ps
mov edi,eax
lea ebx,rect2
assume ebx:ptr RECT .elseif uMsg == WM_LBUTTONUP
invoke EndDialog, hWnd, NULL
.endif
xor eax,eax
retAbout endp

How i load the f****** cursor.ani in this dialog?

Please help! Thanks,

DeRoX

Edited by DeRoX
Posted

OK i got it! :thumbsup:

who wanna know:

invoke LoadCursor,hInstance,1597
mov hCursor,eax.elseif uMsg==WM_MOUSEMOVE
invoke SetCursor,hCursor
.elseif MoveDlg==TRUE
invoke GetWindowRect,hWnd,addr Rect2
invoke GetCursorPos,addr NewPos
mov eax,NewPos.x
mov ecx,eax
sub eax,OldPos.x
mov OldPos.x,ecx
add eax,Rect2.left
mov ebx,NewPos.y
mov ecx,ebx
sub ebx,OldPos.y
mov OldPos.y,ecx
add ebx,Rect2.top
mov ecx,Rect2.right
sub ecx,Rect2.left
mov edx,Rect2.bottom
sub edx,Rect2.top
invoke MoveWindow,hWnd,eax,ebx,ecx,edx,TRUE

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...