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

📄 property.asm

📁 汇编资源编辑器
💻 ASM
📖 第 1 页 / 共 5 页
字号:
				;SizeGrip
				mov		lbid,PRP_BOOL_SIZE
				.if eax==19
					invoke ListFalseTrue,[esi].style,addr SizeSbr,edi
				.endif
			.elseif edx==38
				;Group
				mov		lbid,PRP_BOOL_GROUP
				invoke ListFalseTrue,[esi].style,addr GrouAll,edi
			.elseif edx==39
				;Icon
				mov		lbid,PRP_BOOL_ICON
			.elseif edx==40
				;UseTabs
				mov		lbid,PRP_BOOL_USETAB
				invoke ListFalseTrue,[esi].style,addr UseTLst,edi
			.elseif edx==41
				;StartupPos
				mov		lbid,305
				invoke ListMultiStyle,[esi].style,[esi].exstyle,addr StarDlg,edi
			.elseif edx==42
				;Orientation
				mov		lbid,306
				.if eax==12
					invoke ListMultiStyle,[esi].style,[esi].exstyle,addr OriePgb,edi
				.elseif eax==16
					invoke ListMultiStyle,[esi].style,[esi].exstyle,addr OrieUdn,edi
				.endif
			.elseif edx==43
				;SetBuddy
				mov		lbid,PRP_BOOL_SETBUDDY
				invoke ListFalseTrue,[esi].style,addr SetBUdn,edi
			.elseif edx==44
				;MultiSelect
				mov		lbid,PRP_BOOL_MULTI
				.if eax==8
					invoke ListFalseTrue,[esi].style,addr MultLst,edi
				.elseif eax==21
					invoke ListFalseTrue,[esi].style,addr MultMvi,edi
				.endif
			.elseif edx==45
				;HideSel
				mov		lbid,PRP_BOOL_HIDE
				.if eax==1 || eax==22
					invoke ListFalseTrue,[esi].style,addr HideEdt,edi
				.elseif eax==13
					invoke ListFalseTrue,[esi].style,addr HideTrv,edi
				.elseif eax==14
					invoke ListFalseTrue,[esi].style,addr HideLsv,edi
				.endif
			.elseif edx==46
				;TopMost
				mov		lbid,PRP_BOOL_TOPMOST
				invoke ListFalseTrue,[esi].exstyle,addr TopMost,edi
			.elseif edx==47
				;xExStyle
				mov		lbid,1003
				mov		eax,[esi].exstyle
				invoke hexEax
				invoke lstrcpy,edi,addr strHex
			.elseif edx==48
				;xStyle
				mov		lbid,1004
				mov		eax,[esi].style
				invoke hexEax
				invoke lstrcpy,edi,addr strHex
			.elseif edx==49
				;IntegralHgt
				mov		lbid,PRP_BOOL_INTEGRAL
				.if eax==7
					invoke ListFalseTrue,[esi].style,addr IntHtCbo,edi
				.elseif eax==8
					invoke ListFalseTrue,[esi].style,addr IntHtLst,edi
				.endif
			.elseif edx==50
				;Image
				mov		lbid,1005
				invoke lstrcpy,edi,addr [esi].caption
			.elseif edx==51
				;Buttons
				mov		lbid,PRP_BOOL_BUTTON
				.if eax==11
					invoke ListFalseTrue,[esi].style,addr ButtTab,edi
				.elseif eax==13
					invoke ListFalseTrue,[esi].style,addr ButtTrv,edi
				.elseif eax==32
					invoke ListFalseTrue,[esi].style,addr ButtHdr,edi
				.endif
			.elseif edx==52
				;PopUp
				mov		lbid,PRP_BOOL_POPUP
				invoke ListFalseTrue,[esi].style,addr PopUAll,edi
			.elseif edx==53
				;OwnerDraw
				mov		lbid,PRP_BOOL_OWNERDRAW
				.if eax==14
					invoke ListFalseTrue,[esi].style,addr OwneLsv,edi
				.elseif eax==7 || eax==8
					mov		lbid,308
					invoke ListMultiStyle,[esi].style,[esi].exstyle,addr OwneCbo,edi
				.endif
			.elseif edx==54
				;Transp
				mov		lbid,PRP_BOOL_TRANSP
				invoke ListFalseTrue,[esi].style,addr TranAni,edi
			.elseif edx==55
				;Timer
				mov		lbid,PRP_BOOL_TIME
				invoke ListFalseTrue,[esi].style,addr TimeAni,edi
			.elseif edx==56
				;AutoPlay
				mov		lbid,PRP_BOOL_AUTO
				.if eax==27
					invoke ListFalseTrue,[esi].style,addr AutoAni,edi
				.endif
			.elseif edx==57
				;WeekNum
				mov		lbid,PRP_BOOL_WEEK
				invoke ListFalseTrue,[esi].style,addr WeekMvi,edi
			.elseif edx==58
				;AviClip
				mov		lbid,1006
				invoke lstrcpy,edi,addr [esi].caption
			.elseif edx==59
				;AutoSize
				mov		lbid,PRP_BOOL_AUTO
				.if eax==18 || eax==19
					invoke ListFalseTrue,[esi].style,addr AutoTbr,edi
				.endif
			.elseif edx==60
				;ToolTip
				mov		lbid,PRP_BOOL_TOOLTIP
				.if eax==11
					invoke ListFalseTrue,[esi].style,addr ToolTab,edi
				.else
					invoke ListFalseTrue,[esi].style,addr ToolTbr,edi
				.endif
			.elseif edx==61
				;Wrap
				mov		lbid,PRP_BOOL_WRAP
				invoke ListFalseTrue,[esi].style,addr WrapTbr,edi
			.elseif edx==62
				;Divider
				mov		lbid,PRP_BOOL_DIVIDER
				invoke ListFalseTrue,[esi].style,addr DiviTbr,edi
			.elseif edx==63
				;DragDrop
				mov		lbid,PRP_BOOL_DRAGDROP
				invoke ListFalseTrue,[esi].style,addr DragHdr,edi
			.elseif edx==64
				;Smooth
				mov		lbid,PRP_BOOL_SMOOTH
				invoke ListFalseTrue,[esi].style,addr SmooPgb,edi
			.elseif edx==65
				;Language
				mov		lbid,1007
				mov		dword ptr [edi],'0,0'
			.elseif eax>=NoOfButtons
				;Custom properties
				invoke GetCustProp,eax,edx
				mov		lbid,eax
				.if eax
					.if dword ptr [eax]==1
						invoke ListFalseTrue,[esi].style,[eax+4],edi
					.elseif dword ptr [eax]==2
						invoke ListFalseTrue,[esi].exstyle,[eax+4],edi
					.elseif dword ptr [eax]==3
						invoke ListMultiStyle,[esi].style,[esi].exstyle,[eax+4],edi
					.endif
				.endif
			.endif
			invoke SendMessage,hPrpLstDlg,LB_ADDSTRING,0,addr buffer1
			invoke SendMessage,hPrpLstDlg,LB_SETITEMDATA,eax,lbid
		.endif
		inc		nInx
		jmp		@b
	  @@:
		invoke SendMessage,hPrpLstDlg,LB_SETTOPINDEX,tInx,0
		invoke GetWindowLong,hDEd,DEWM_MEMORY
		.if eax
			invoke UpdateCbo,eax
			invoke SetCbo,hCtl
		.endif
		assume esi:nothing
	.endif
	invoke SetFocus,hDEd
	invoke SendMessage,hPrpLstDlg,LB_FINDSTRING,-1,addr szLbString
	.if eax==LB_ERR
		xor		eax,eax
	.endif
	invoke SendMessage,hPrpLstDlg,LB_SETCURSEL,eax,0
	invoke SendMessage,hPrpLstDlg,WM_SETREDRAW,TRUE,0
	ret

PropertyList endp

PrpCboDlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
	LOCAL	nInx:DWORD

	mov		eax,uMsg
	.if eax==WM_COMMAND
		mov		eax,wParam
		shr		eax,16
		.if eax==CBN_SELCHANGE
			invoke SendMessage,hWin,CB_GETCURSEL,0,0
			mov		nInx,eax
			invoke SendMessage,hWin,CB_GETITEMDATA,nInx,0
			invoke SizeingRect,eax,FALSE
		.endif
	.endif
	invoke CallWindowProc,OldPrpCboDlgProc,hWin,uMsg,wParam,lParam
	ret

PrpCboDlgProc endp

PrpLstDlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
	LOCAL	nInx:DWORD
	LOCAL	rect:RECT
	LOCAL	hCtl:DWORD
	LOCAL	lbid:DWORD
	LOCAL	lf:LOGFONT
	LOCAL	hFnt:DWORD
	LOCAL	ofn:OPENFILENAME
    LOCAL	hDC:DWORD
    LOCAL	cf:CHOOSEFONT

	mov		eax,uMsg
	.if eax==WM_LBUTTONDBLCLK
		invoke SendMessage,hWin,LB_GETCURSEL,0,0
		mov		nInx,eax
		invoke SendMessage,hWin,LB_GETITEMDATA,nInx,0
		mov		lbid,eax
		.if (eax>=PRP_BOOL_SYSMENU && eax<=499) || eax>65535
			invoke SendMessage,hWin,WM_SETREDRAW,FALSE,0
			invoke SendMessage,hWin,WM_COMMAND,1,0
			invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
			invoke ShowWindow,hPrpEdtDlgCld,SW_HIDE
			invoke SendMessage,hPrpLstDlgCld,LB_GETCURSEL,0,0
			inc		eax
			mov		nInx,eax
			invoke SendMessage,hPrpLstDlgCld,LB_GETCOUNT,0,0
			.if eax==nInx
				mov		nInx,0
			.endif
			invoke SendMessage,hPrpLstDlgCld,LB_SETCURSEL,nInx,0
			invoke SendMessage,hPrpLstDlgCld,WM_LBUTTONUP,0,0
			invoke SendMessage,hWin,WM_SETREDRAW,TRUE,0
			invoke SetFocus,hWin
		.elseif eax==1000 || eax==1002 || eax==1003 || eax==1004 || eax==1005 || eax==1006 || eax==1007
			invoke SendMessage,hWin,WM_COMMAND,1,0
		.else
			invoke PropListSetPos
			invoke ShowWindow,hPrpEdtDlgCld,SW_SHOW
			invoke SetFocus,hPrpEdtDlgCld
			invoke SendMessage,hPrpEdtDlgCld,EM_SETSEL,0,-1
		.endif
		xor		eax,eax
		ret
	.elseif eax==WM_LBUTTONDOWN
		invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
	.elseif eax==WM_MOUSEMOVE
		.if hStatus
			invoke SendMessage,hStatus,SB_SETTEXT,nStatus,offset szNULL
		.endif
	.elseif eax==WM_COMMAND
		mov		edx,wParam
		movzx	eax,dx
		shr		edx,16
		.if edx==BN_CLICKED && eax==1
			invoke GetWindowLong,hPrpLstDlgCld,GWL_STYLE
			and		eax,WS_VISIBLE
			.if eax
				invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
			.else
				invoke SendMessage,hWin,LB_GETCURSEL,0,0
				.if eax!=LB_ERR
					mov		nInx,eax
					invoke GetWindowLong,hWin,GWL_USERDATA
					mov		hCtl,eax
					invoke SendMessage,hWin,LB_GETITEMDATA,nInx,0
					mov		lbid,eax
					.if eax==1000
						;Font
						invoke RtlZeroMemory,addr lf,sizeof lf
						invoke GetWindowLong,hCtl,GWL_USERDATA
						mov		esi,eax
						sub		esi,sizeof DLGHEAD
						invoke lstrcpy,addr lf.lfFaceName,addr (DLGHEAD ptr [esi]).font
						push	(DLGHEAD ptr [esi]).fontht
						pop		lf.lfHeight
						mov		cf.lStructSize,sizeof CHOOSEFONT
						invoke GetDC,hWin
						mov		hDC, eax
						mov		cf.hDC,eax
						push	hWin
						pop		cf.hWndOwner
						lea		eax,lf
						mov		cf.lpLogFont,eax
						mov		cf.iPointSize,0
						mov		cf.Flags,CF_SCREENFONTS or CF_INITTOLOGFONTSTRUCT
						mov		cf.rgbColors,0
						mov		cf.lCustData,0
						mov		cf.lpfnHook,0
						mov		cf.lpTemplateName,0
						mov		cf.hInstance,0
						mov		cf.lpszStyle,0
						mov		cf.nFontType,0
						mov		cf.Alignment,0
						mov		cf.nSizeMin,0
						mov		cf.nSizeMax,0
						invoke ChooseFont,addr cf
						push	eax
						invoke ReleaseDC,hWin,hDC
						pop		eax
						.if eax
							invoke ResetSize,esi
							mov		eax,lf.lfHeight
							mov		(DLGHEAD ptr [esi]).fontht,eax
							mov		eax,cf.iPointSize
							mov		ecx,10
							xor		edx,edx
							div		ecx
							mov		(DLGHEAD ptr [esi]).fontsize,eax
							invoke lstrcpy,addr (DLGHEAD ptr [esi]).font,addr lf.lfFaceName
							mov		eax,(DLGHEAD ptr [esi]).hfont
							invoke DeleteObject,eax
							invoke MakeDlgFont,esi
							mov		hFnt,eax
							add		esi,sizeof DLGHEAD
							assume esi:ptr DIALOG
							.while TRUE
								mov		eax,[esi].hwnd
							  .break .if !eax
								.if eax!=-1
									mov		eax,[esi].hcld
									.if !eax
										mov		eax,[esi].hwnd
									.endif
									invoke SendMessage,eax,WM_SETFONT,hFnt,TRUE
									mov		eax,[esi].hcld
									.if eax
										mov		eax,[esi].hwnd
										invoke InvalidateRect,eax,NULL,TRUE
									.endif
								.endif
								add		esi,sizeof DIALOG
							.endw
							invoke PropertyList,hCtl
							invoke SetChanged,TRUE,0
						.endif
					.elseif eax==1002
						;Dialog Memu
						invoke SendMessage,hWin,LB_GETITEMRECT,nInx,addr rect
						add		rect.top,lbHt
						add		rect.left,lbTp+1
						mov		eax,rect.left
						sub		rect.right,eax
						invoke PropTxtLst,hCtl,lbid
						invoke SetTxtLstPos,addr rect
					.elseif eax==1003
						;xStyle
						invoke GetWindowLong,hCtl,GWL_USERDATA
						mov		StyleOfs,eax
						mov		StyleTxt,offset szExStyle
						mov		StyleEx,TRUE
						invoke DialogBoxParam,hInstance,IDD_PROPERTY,hWin,addr PropertyDlgProc,0
						invoke SendMessage,hWin,LB_SETCURSEL,nInx,0
					.elseif eax==1004
						;;xExStyle
						invoke GetWindowLong,hCtl,GWL_USERDATA
						mov		StyleOfs,eax
						mov		StyleTxt,offset szStyle
						mov		StyleEx,FALSE
						invoke DialogBoxParam,hInstance,IDD_PROPERTY,hWin,addr PropertyDlgProc,0
						invoke SendMessage,hWin,LB_SETCURSEL,nInx,0
					.elseif eax==1005
						;Image
						invoke SendMessage,hWin,LB_GETITEMRECT,nInx,addr rect
						add		rect.top,lbHt
						add		rect.left,lbTp+1
						mov		eax,rect.left
						sub		rect.right,eax
						invoke PropTxtLst,hCtl,lbid
						invoke SetTxtLstPos,addr rect
					.elseif eax==1006
						;Avi
						invoke SendMessage,hWin,LB_GETITEMRECT,nInx,addr rect
						add		rect.top,lbHt
						add		rect.left,lbTp+1
						mov		eax,rect.left
						sub		rect.right,eax
						invoke PropTxtLst,hCtl,lbid
						invoke SetTxtLstPos,addr rect
					.elseif eax==1007
						;Language
					.else
						invoke SendMessage,hWin,LB_GETITEMRECT,nInx,addr rect
						add		rect.top,lbHt
						add		rect.left,lbTp+1
						mov		eax,rect.left
						sub		rect.right,eax
						invoke PropTxtLst,hCtl,lbid
						invoke SetTxtLstPos,addr rect
					.endif
				.endif
			.endif
		.endif
	.elseif eax==WM_CHAR
		.if wParam==VK_RETURN
			invoke SendMessage,hWin,WM_LBUTTONDBLCLK,0,0
		.elseif wParam==VK_TAB
			invoke SetFocus,hDEd
			invoke SendMessage,hDEd,WM_KEYDOWN,VK_TAB,0
		.endif
	.elseif eax==WM_VSCROLL
		invoke ShowWindow,hPrpBtnDlgCld,SW_HIDE
		invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
		invoke ShowWindow,hPrpEdtDlgCld,SW_HIDE
	.endif
	invoke CallWindowProc,OldPrpLstDlgProc,hWin,uMsg,wParam,lParam
	assume esi:nothing
	ret

PrpLstDlgProc endp

PrpEdtDlgCldProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
	LOCAL	nInx:DWORD
	LOCAL	buffer[256]:BYTE
	LOCAL	hCtl:HWND

	mov		eax,uMs

⌨️ 快捷键说明

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