⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlgedit.asm

📁 汇编资源编辑器
💻 ASM
📖 第 1 页 / 共 5 页
字号:
					;  SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
					dd 00000000000000000000000000000000b
					;  S
					dd 00000000000000000000000000000000b
					;
				;25-Static Rect & Line
					dd 25
					dd offset szStaticClass
					dd 0	;Parent
					dd WS_VISIBLE or WS_CHILD or SS_BLACKRECT
					dd 0	;ExStyle
					dd offset ShpID
					dd offset szNULL
					dd offset szCONTROL
					dd 0	;nmethod
					dd 0	;methods
					dd 11111101000111000000010000000100b
					;  NILTWHCBCMMEVCSDAAMWMTLCSTFMCNAW
					dd 00010000000000011000000000000000b
					;  SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
					dd 00000000000000000000000000000000b
					;  S
					dd 00000000000000000000000000000000b
					;
				;26-IP Address
					dd 26
					dd offset szIPAddressClass
					dd 0	;Parent
					dd WS_VISIBLE or WS_CHILD or WS_TABSTOP
					dd 0	;ExStyle
					dd offset IpaID
					dd offset szNULL
					dd offset szCONTROL
					dd 0	;nmethod
					dd 0	;methods
					dd 11111101000111000000000001000000b
					;  NILTWHCBCMMEVCSDAAMWMTLCSTFMCNAW
					dd 00010000000000011000000000000000b
					;  SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
					dd 00000000000000000000000000000000b
					;  S
					dd 00000000000000000000000000000000b
					;
				;27-Animate
					dd 27
					dd offset szAnimateClass
					dd 0	;Parent
					dd WS_VISIBLE or WS_CHILD
					dd 0	;ExStyle
					dd offset AniID
					dd offset szNULL
					dd offset szCONTROL
					dd 0	;nmethod
					dd 0	;methods
					dd 11111101000111000100000000000000b
					;  NILTWHCBCMMEVCSDAAMWMTLCSTFMCNAW
					dd 00010000000000011000001110100000b
					;  SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
					dd 00000000000000000000000000000000b
					;  S
					dd 00000000000000000000000000000000b
					;
				;28-HotKey
					dd 28
					dd offset szHotKeyClass
					dd 0	;Parent
					dd WS_VISIBLE or WS_CHILD or WS_TABSTOP
					dd 0	;ExStyle
					dd offset HotID
					dd offset szNULL
					dd offset szCONTROL
					dd 0	;nmethod
					dd 0	;methods
					dd 11111101000111000000000001000000b
					;  NILTWHCBCMMEVCSDAAMWMTLCSTFMCNAW
					dd 00010000000000011000000000000000b
					;  SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
					dd 00000000000000000000000000000000b
					;  S
					dd 00000000000000000000000000000000b
					;
				;29-HPager
					dd 29
					dd offset szPagerClass
					dd 0	;Parent
					dd WS_VISIBLE or WS_CHILD or PGS_HORZ
					dd 0	;ExStyle
					dd offset PgrID
					dd offset szNULL
					dd offset szCONTROL
					dd 0	;nmethod
					dd 0	;methods
					dd 11111101000111000000000001000000b
					;  NILTWHCBCMMEVCSDAAMWMTLCSTFMCNAW
					dd 00010000000000011000000000000000b
					;  SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
					dd 00000000000000000000000000000000b
					;  S
					dd 00000000000000000000000000000000b
					;
				;30-VPager
					dd 30
					dd offset szPagerClass
					dd 0	;Parent
					dd WS_VISIBLE or WS_CHILD or PGS_VERT
					dd 0	;ExStyle
					dd offset PgrID
					dd offset szNULL
					dd offset szCONTROL
					dd 0	;nmethod
					dd 0	;methods
					dd 11111101000111000000000001000000b
					;  NILTWHCBCMMEVCSDAAMWMTLCSTFMCNAW
					dd 00010000000000011000000000000000b
					;  SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
					dd 00000000000000000000000000000000b
					;  S
					dd 00000000000000000000000000000000b
					;
				;31-ReBar
					dd 31
					dd offset szReBarClass
					dd 0	;Parent
					dd WS_VISIBLE or WS_CHILD
					dd 0	;ExStyle
					dd offset RebID
					dd offset szNULL
					dd offset szCONTROL
					dd 0	;nmethod
					dd 0	;methods
					dd 11111101000111000000000001000000b
					;  NILTWHCBCMMEVCSDAAMWMTLCSTFMCNAW
					dd 00010000000000011000000000000000b
					;  SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
					dd 00000000000000000000000000000000b
					;  S
					dd 00000000000000000000000000000000b
					;
				;32-Header
					dd 32
					dd offset szHeaderClass
					dd 0	;Not used
					dd WS_VISIBLE or WS_CHILD or HDS_BUTTONS
					dd 0	;ExStyle
					dd offset HdrID
					dd offset szNULL
					dd offset szCONTROL
					dd 0	;nMethod
					dd 0	;Methods
					dd 11111101000111000000000000000000b
					;  NILTWHCBCMMEVCSDAAMWMTLCSTFMCNAW
					dd 00010000000000011001000000000001b
					;  SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
					dd 00000000000000000000000000000000b
					;  S
					dd 00000000000000000000000000000000b
					;  
custtypes			TYPES 32 dup(<?>)

szNOTStyle			db 'NOT ',0
dwNOTStyle			dd WS_VISIBLE

					align 4
dlgdata				dd WS_VISIBLE or WS_CAPTION or DS_SETFONT		;style
					dd 00000000h					;exstyle
					dw 0000h						;cdit
					dw 0006h						;x
					dw 0006h						;y
					dw 0060h						;cx
					dw 0040h						;cy
					dw 0000h						;menu
					dw 0000h						;class
					dw 0000h						;caption
dlgps				dw 0							;point size
dlgfn				dw 33 dup(0)					;face name

.data?

fGrid				dd ?
fSnapToGrid			dd ?
fShowSizePos		dd ?
hSizeing			dd 8 dup(?)
hMultiSel			dd ?
fNoMouseUp			dd ?
CtlRect				RECT <?>
fSizeing			dd ?
fMoveing			dd ?
fDrawing			dd ?
fMultiSel			dd ?
ParPt				POINT <?>
hReSize				dd ?
MousePtDown			POINT <?>
OldSizeingProc		dd ?
hDlgIml				dd ?
dlgpaste			DIALOG MAXMULSEL dup(<?>)
SizeRect			RECT MAXMULSEL dup(<?>)
;Dialog menu
MnuRight			dd ?
MnuHigh				dd ?
MnuTrack			dd ?
MnuInx				dd ?

hScrDC				dd ?
hWinDC				dd ?
hWinHwnd			dd ?
hWinRgn				dd ?
hComDC				dd ?
hWinBmp				dd ?
hOldRgn				dd ?
fNoParent			dd ?
dfntwt				dd ?
dfntht				dd ?

mpt					POINT <?>
fntwt				dd ?
fntht				dd ?
hRect				dd MAXMULSEL*4 dup(?)

.code

CaptureWin proc hWin:HWND
	LOCAL	rect:RECT
	LOCAL	rect1:RECT
	LOCAL	Ht:DWORD
	LOCAL	Wt:DWORD
	LOCAL	hCld:HWND

	.if !hComDC
		mov		eax,hWin
		mov		hCld,eax
		invoke GetParent,hWin
		mov		hWin,eax
		invoke GetWindowRect,hWin,addr rect
		mov		eax,rect.right
		sub		eax,rect.left
		mov		Wt,eax
		mov		eax,rect.bottom
		sub		eax,rect.top
		mov		Ht,eax
		invoke GetWindowDC,hWin
		mov    hWinDC,eax
		mov		eax,hWin
		mov		hWinHwnd,eax
		invoke CreateCompatibleDC,hWinDC
		mov    hComDC,eax
		invoke CreateCompatibleBitmap,hWinDC,Wt,Ht
		mov     hWinBmp,eax
		invoke GdiFlush
		invoke SelectObject,hComDC,hWinBmp
		invoke BitBlt,hComDC,0,0,Wt,Ht,hWinDC,0,0,SRCCOPY
		invoke GetDC,0
		mov		hScrDC,eax
		.if fNoParent
			invoke GetWindowRect,hCld,addr rect
		.endif
		invoke GetClientRect,hDEd,addr rect1
		invoke ClientToScreen,hDEd,addr rect1.left
		invoke ClientToScreen,hDEd,addr rect1.right
		mov		eax,rect1.left
		.if eax>rect.left
			mov		rect.left,eax
		.endif
		mov		eax,rect1.top
		.if eax>rect.top
			mov		rect.top,eax
		.endif
		mov		eax,rect1.right
		.if eax<rect.right
			mov		rect.right,eax
		.endif
		mov		eax,rect1.bottom
		.if eax<rect.bottom
			mov		rect.bottom,eax
		.endif
		invoke CreateRectRgn,rect.left,rect.top,rect.right,rect.bottom
		mov		hWinRgn,eax
		invoke SelectObject,hScrDC,hWinRgn
		mov		hOldRgn,eax
	.endif
	ret

CaptureWin endp

PaintWin proc hWin:HWND
	LOCAL	hDC:HDC
	LOCAL	rect:RECT

	.if hComDC
		invoke GetParent,hWin
		mov		hWin,eax
		invoke GetWindowDC,hWin
		mov		hDC,eax
		invoke GetWindowRect,hWin,addr rect
		mov		eax,rect.right
		sub		eax,rect.left
		mov		rect.right,eax
		mov		eax,rect.bottom
		sub		eax,rect.top
		mov		rect.bottom,eax
		invoke BitBlt,hDC,0,0,rect.right,rect.bottom,hComDC,0,0,SRCCOPY
		invoke ReleaseDC,hWin,hDC
	.endif
	ret

PaintWin endp

DestroyWin proc

	.if hComDC
		invoke ReleaseDC,hWinHwnd,hWinDC
		invoke DeleteDC,hComDC
		invoke DeleteObject,hWinBmp
		invoke SelectObject,hScrDC,hOldRgn
		invoke DeleteObject,hWinRgn
		invoke ReleaseDC,0,hScrDC
		mov		hComDC,0
	.endif
	ret

DestroyWin endp

DlgDrawRect proc uses esi edi,hWin:HWND,lpRect:DWORD,nFun:DWORD,nInx:DWORD
	LOCAL	ht:DWORD
	LOCAL	wt:DWORD
	LOCAL	rect:RECT

	invoke CopyRect,addr rect,lpRect
	lea		esi,rect
	assume esi:ptr RECT
	add		[esi].right,1
	mov		eax,[esi].right
	sub		eax,[esi].left
	jns		@f
	mov		eax,[esi].right
	xchg	eax,[esi].left
	mov		[esi].right,eax
	sub		eax,[esi].left
	dec		[esi].left
	inc		[esi].right
	inc		eax
  @@:
	mov		wt,eax
	add		[esi].bottom,1
	mov		eax,[esi].bottom
	sub		eax,[esi].top
	jns		@f
	mov		eax,[esi].bottom
	xchg	eax,[esi].top
	mov		[esi].bottom,eax
	sub		eax,[esi].top
	dec		[esi].top
	inc		[esi].bottom
	inc		eax
  @@:
	mov		ht,eax
	dec		[esi].right
	dec		[esi].bottom
	mov		edi,nInx
	shl		edi,4
	add		edi,offset hRect
	.if nFun==0
		.if nInx==0
			invoke CaptureWin,hWin
		.endif
		invoke GetStockObject,BLACK_BRUSH
		mov edx,eax
		invoke FrameRect,hScrDC,addr rect,edx
	.elseif nFun==1
		.if nInx==0
			invoke PaintWin,hWin
		.endif
		invoke GetStockObject,BLACK_BRUSH
		mov edx,eax
		invoke FrameRect,hScrDC,addr rect,edx
	.elseif nFun==2
		.if nInx==0
			invoke PaintWin,hWin
			invoke DestroyWin
		.endif
	.endif
	assume esi:nothing
	ret

DlgDrawRect endp

GetFreeDlg proc hDlgMem:DWORD

	mov		eax,hDlgMem
	add		eax,sizeof DLGHEAD
	sub		eax,sizeof DIALOG
  @@:
	add		eax,sizeof DIALOG
	cmp		(DIALOG ptr [eax]).hwnd,0
	jne		@b
	ret

GetFreeDlg endp

GetFreeID proc uses esi edi

	invoke GetWindowLong,hDEd,DEWM_MEMORY
	.if eax
		mov		esi,eax
		assume esi:ptr DLGHEAD
		mov		eax,[esi].ctlid
		add		esi,sizeof DLGHEAD
		assume esi:ptr DIALOG
		sub		esi,sizeof DIALOG
		mov		edi,esi
	  @@:
		add		esi,sizeof DIALOG
		cmp		[esi].hwnd,0
		je		@f
		cmp		[esi].hwnd,-1
		je		@b
		cmp		eax,[esi].id
		jne		@b
		mov		esi,edi
		inc		eax
		jmp		@b
	  @@:
		assume esi:nothing
	.endif
	ret

GetFreeID endp

IsFreeID proc uses esi,nID:DWORD

	invoke GetWindowLong,hDEd,DEWM_MEMORY
	.if eax
		mov		esi,eax
		add		esi,sizeof DLGHEAD
		assume esi:ptr DIALOG
		sub		esi,sizeof DIALOG
		mov		eax,nID
	  @@:
		add		esi,sizeof DIALOG
		cmp		[esi].hwnd,0
		je		@f
		cmp		[esi].hwnd,-1
		je		@b
		cmp		eax,[esi].id
		jne		@b
		mov		eax,0
	  @@:
		assume esi:nothing
	.endif
	.if eax
		;ID is free
		mov		eax,TRUE
	.else
		mov		eax,FALSE
	.endif
	ret

IsFreeID endp

GetFreeTab proc uses esi edi
	LOCAL	nTab:DWORD

	invoke GetWindowLong,hDEd,DEWM_MEMORY
	.if eax
		mov		esi,eax
		add		esi,sizeof DLGHEAD
		assume esi:ptr DIALOG
		mov		edi,esi
		mov		nTab,0
	  @@:
		add		esi,sizeof DIALOG
		cmp		[esi].hwnd,0
		je		@f
		cmp		[esi].hwnd,-1
		je		@b
		mov		eax,nTab
		cmp		eax,[esi].tab
		jne		@b
		mov		esi,edi
		inc		nTab
		jmp		@b
	  @@:
		mov		eax,nTab
	.endif
	assume esi:nothing
	ret

GetFreeTab endp

;0 1 2 3 4 5 6 7
;0 1 2 5 3 4 6 7
;if new>old
;	if t>old and t<=new then t=t-1
;0 1 2 3 4 5 6 7
;0 2 3 1 4 5 6 7
;if new<old
;	if t<old and t>=new then t=t+1
SetNewTab proc uses esi edi,hCtl:HWND,nTab:DWORD
	LOCAL	nOld:DWORD

	invoke GetWindowLong,hCtl,GWL_USERDATA
	.if eax
		mov		esi,eax
		invoke GetFreeTab
		.if eax<=nTab
			.if eax
				dec		eax
			.endif
			mov		nTab,eax
		.endif
		mov		eax,(DIALOG ptr [esi]).tab
		mov		nOld,eax
		mov		edi,esi
		invoke GetWindowLong,hDEd,DEWM_MEMORY
		.if eax
			mov		esi,eax
			add		esi,sizeof DLGHEAD
			assume esi:ptr DIALOG
		  @@:
			add		esi,sizeof DIALOG
			cmp		[esi].hwnd,0
			je		@f
			cmp		[esi].hwnd,-1
			je		@b
			mov		eax,nTab
			.if eax>nOld
				mov		eax,[esi].tab
				.if eax>nOld && eax<=nTab
					dec		[esi].tab
				.endif
			.else
				mov		eax,[esi].tab
				.if eax<nOld && eax>=nTab
					inc		[esi].tab
				.endif
			.endif
			jmp		@b
		  @@:
			mov		eax,nTab
			mov		(DIALOG ptr [edi]).tab,eax
			assume esi:nothing
		.endif
	.endif
	ret

SetNewTab endp

InsertTab proc uses esi,nTab:DWORD

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -