Привет знатокам! Ребят, помогите, плиз. Собрал трейнер для игрушки с помощью Game Trainer Studio, теперь хочется вставить туда ссылку на домашнюю страницу, но понятия не имею как это сделать. Надо, чтобы ссылка открывалась в браузере по умолчанию. Поправьте код как надо, пожалуйста. Сам я в этом деле ноль.
[spoiler=код]
Код: ; #########################################################################
;
; This Is My Trainer Template Created For The Game Trainer Studio (Xeta)
;
; This Is Based On A MASM Example.
;
; #########################################################################
.386
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
include trainer.inc ; local includes for this file
; #########################################################################
.data
LabelHandle5500 dd ?
LabelHandle5501 dd ?
LabelHandle5502 dd ?
; ### Constants Below
; ### Constants Above
; ### Bytes Below
HotKey00000 db 000h
db 001h
db 000h
db 001h
HotKey00001 db 001h
db 001h
db 001h
db 000h
; ### Bytes Above
; ### Button Messages Below
; ### Button Messages Above
WindCap db "Game.exe",0
szDisplayName db 'Trainer-2',0
.code
start:
invoke GetModuleHandle, NULL
mov hInstance, eax
invoke GetCommandLine
mov CommandLine, eax
invoke WinMain,hInstance,NULL,CommandLine,SW_SHOWDEFAULT
invoke ExitProcess,eax
; #########################################################################
WinMain proc hInst
WORD,
hPrevInst
WORD,
CmdLine
WORD,
CmdShow
WORD
;====================
; Put LOCALs on stack
;====================
LOCAL wc :WNDCLASSEX
LOCAL msg :MSG
LOCAL Wwd
WORD
LOCAL Wht
WORD
LOCAL Wtx
WORD
LOCAL Wty
WORD
;==================================================
; Fill WNDCLASSEX structure with required variables
;==================================================
invoke LoadIcon,hInst,500 ; icon ID
mov hIcon, eax
szText szClassName,"Trainer_Class"
mov wc.cbSize, sizeof WNDCLASSEX
mov wc.style, CS_HREDRAW or CS_VREDRAW \
or CS_BYTEALIGNWINDOW
mov wc.lpfnWndProc, offset WndProc
mov wc.cbClsExtra, NULL
mov wc.cbWndExtra, NULL
m2m wc.hInstance, hInst
mov wc.hbrBackground, COLOR_BTNFACE+1
mov wc.lpszMenuName, NULL
mov wc.lpszClassName, offset szClassName
m2m wc.hIcon, hIcon
invoke LoadCursor,NULL,IDC_ARROW
mov wc.hCursor, eax
m2m wc.hIconSm, hIcon
invoke RegisterClassEx, ADDR wc
;================================
; Centre window at following size
;================================
mov Wwd, 209 ; Dialog Width
mov Wht, 118 ; Dialog Height
invoke GetSystemMetrics,SM_CXSCREEN
invoke TopXY,Wwd,eax
mov Wtx, eax
invoke GetSystemMetrics,SM_CYSCREEN
invoke TopXY,Wht,eax
mov Wty, eax
invoke CreateWindowEx,WS_EX_LEFT,
ADDR szClassName,
ADDR szDisplayName,
WS_MINIMIZEBOX or WS_OVERLAPPED or WS_SYSMENU,
Wtx,Wty,Wwd,Wht,
NULL,NULL,
hInst,NULL
mov hWnd,eax
invoke ShowWindow,hWnd,SW_SHOWNORMAL
invoke UpdateWindow,hWnd
;===================================
; Loop until PostQuitMessage is sent
;===================================
StartLoop:
invoke GetMessage,ADDR msg,NULL,0,0
cmp eax, 0
je ExitLoop
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
jmp StartLoop
ExitLoop:
return msg.wParam
WinMain endp
; #########################################################################
WndProc proc hWin
WORD,
uMsg
WORD,
wParam
WORD,
lParam
WORD
LOCAL var
WORD
LOCAL caW
WORD
LOCAL caH
WORD
LOCAL color
WORD
LOCAL hDC
WORD
LOCAL Rct :RECT
LOCAL Ps
AINTSTRUCT
LOCAL buffer1[128]:BYTE
LOCAL buffer2[128]:BYTE
LOCAL lfnt :LOGFONT
LOCAL psd
AGESETUPDLG
LOCAL pd
RINTDLG
LOCAL RectB :RECT
.if uMsg == WM_COMMAND
MOV EAX, wParam
.if wParam == 499
.endif
.elseif uMsg == WM_CTLCOLORSTATIC
JMP @WM_CTLCOLOREDIT
.elseif uMsg == WM_CTLCOLOREDIT
@WM_CTLCOLOREDIT:
.elseif uMsg == WM_DRAWITEM
.elseif uMsg == WM_CREATE
MOV HotKeyMiniToggle, TRUE
szText font1,'MS Sans Serif'
invoke CreateFont,8,5,0,0,500,0,0,0, \
DEFAULT_CHARSET,0,0,0,\
DEFAULT_PITCH,ADDR font1
mov hFont, eax
Invoke SetTimer, hWin, 1, 100, 0 ; HotKey Timer
Invoke SetTimer, hWin, 2, 300, 0 ; EditBox Timer 1
Invoke SetTimer, hWin, 3, 300, 0 ; EditBox Timer 2
Invoke SetTimer, hWin, 4, 100, 0 ; EditBox Freeze Timer
szText lbl11, "Домашняя страница"
invoke Static,ADDR lbl11,hWin,48,56,116,17,5500
mov LabelHandle5500, eax
szText lbl12, "Trainer for Game"
invoke Static,ADDR lbl12,hWin,56,8,92,17,5501
mov LabelHandle5501, eax
szText lbl13, "F12 - бесконечные патроны"
invoke Static,ADDR lbl13,hWin,24,32,148,17,5502
mov LabelHandle5502, eax
.elseif uMsg == WM_TIMER
.If wParam == 1 ; ### Timer Below ###
Invoke GetKeyState, VK_HOME
mov HotBuffer1, eax
.if HotBuffer1 > 1
Invoke TrainerEngineRead, NULL, Offset WindCap, 001C0F965h, 1
MOV Read, EAX
.If Read == 001h
Invoke TrainerEngine, NULL, Offset WindCap, 001C0F965h, Offset HotKey00000, 4
.Else
Invoke TrainerEngine, NULL, Offset WindCap, 001C0F965h, Offset HotKey00001, 4
.EndIf
.endif
.Endif ; ### Timer Above ###
.If wParam == 2 ; ### Timer Below ###
.Endif ; ### Timer Above ###
.If wParam == 3 ; ### Timer Below ###
.Endif ; ### Timer Above ###
.If wParam == 4 ; ### EBFreeze Timer Below ###
.Endif ; ### EBFreeze Timer Above ###
.elseif uMsg == WM_HOTKEY
.elseif uMsg == WM_PAINT
invoke BeginPaint,hWin,ADDR Ps
mov hDC, eax
invoke Paint_Proc,hWin,hDC
invoke EndPaint,hWin,ADDR Ps
return 0
.elseif uMsg == WM_DESTROY
invoke PostQuitMessage,NULL
return 0
.endif
invoke DefWindowProc,hWin,uMsg,wParam,lParam
ret
WndProc endp
; ########################################################################
TopXY proc wDim:DWORD, sDim:DWORD
shr sDim, 1 ; divide screen dimension by 2
shr wDim, 1 ; divide window dimension by 2
mov eax, wDim ; copy window dimension into eax
sub sDim, eax ; sub half win dimension from half screen dimension
return sDim
TopXY endp
; #########################################################################
Paint_Proc proc hWin:DWORD, hDC:DWORD
LOCAL btn_hi
WORD
LOCAL btn_lo
WORD
LOCAL Rct :RECT
invoke GetSysColor,COLOR_BTNHIGHLIGHT
mov btn_hi, eax
invoke GetSysColor,COLOR_BTNSHADOW
mov btn_lo, eax
return 0
Paint_Proc endp
; ########################################################################
OnDrawItem proc uses ebx idCtl:DWORD,pdis:DWORD,pcol:DWORD,pbkcol:DWORD
LOCAL tbuff[20h]:byte
mov ebx,pdis
assume ebx:ptr DRAWITEMSTRUCT
.if [ebx].CtlType == ODT_BUTTON
.if pbkcol == 0
.else
invoke SetBkMode,[ebx].hdc,OPAQUE
Invoke SetBkColor,[ebx].hdc,pbkcol
Invoke CreateSolidBrush, pbkcol
invoke FillRect,[ebx].hdc,addr [ebx].rcItem,eax
.endif
invoke SetTextColor,[ebx].hdc,pcol
.if ([ebx].itemState & ODS_SELECTED)
invoke DrawEdge,[ebx].hdc,addr [ebx].rcItem,BDR_SUNKEN,BF_RECT
invoke OffsetRect,addr [ebx].rcItem,1,1
.else
invoke DrawEdge,[ebx].hdc,addr [ebx].rcItem,EDGE_RAISED,BF_RECT
.endif
invoke GetWindowText,[ebx].hwndItem,addr tbuff,sizeof tbuff
lea edx,[ebx].rcItem
lea ecx,tbuff
invoke DrawText,[ebx].hdc,ecx,eax,edx,DT_CENTER or DT_VCENTER or DT_SINGLELINE or DT_NOCLIP
.if [ebx].itemState & ODS_FOCUS
invoke InflateRect,addr [ebx].rcItem,-4,-4
invoke DrawFocusRect,[ebx].hdc,addr [ebx].rcItem
.endif
.endif
assume ebx:nothing
ret
OnDrawItem endp
; ########################################################################
end start