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

📄 dlgwhch.asm

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 ASM
字号:
	include ..\cwlib.inc
	scode


;-------------------------------------------------------------------------
;
;Work out which section of a dialog the specified co-ords relate to.
;
;On Entry:
;
;ECX	- X coord.
;EDX	- Y coord.
;ESI	- Dialog.
;
;On Exit:
;
;EAX	- Entry number, -1 for none.
;ECX	- Relative X coord.
;EDX	- Relative Y coord.
;
;ALL other registers preserved.
;
DialogWhich	proc	near
	pushm	ebx,esi,edi,ebp
	mov	ebx,ecx
	mov	edi,esi
	add	edi,size DlgMain
	xor	ecx,ecx
	;
@@0:	cmp	Dlg_State[edi],-1
	jz	@@9
	call	DialogGetButtonX
	cmp	ebx,eax
	jl	@@1
	mov	ebp,eax
	call	DialogGetButtonW
	add	eax,ebp
	cmp	ebx,eax
	jge	@@1
	call	DialogGetButtonY
	cmp	edx,eax
	jl	@@1
	mov	ebp,eax
	call	DialogGetButtonD
	add	eax,ebp
	cmp	edx,eax
	jge	@@1
	call	DialogGetButtonX
	sub	ebx,eax
	call	DialogGetButtonY
	sub	edx,eax
	mov	eax,ecx
	mov	ecx,ebx
	jmp	@@10
	;
@@1:	add	edi,size Dlg
	inc	ecx
	jmp	@@0
	;
@@9:	mov	eax,-1
@@10:	popm	ebx,esi,edi,ebp
	ret
DialogWhich	endp


	efile
	end

⌨️ 快捷键说明

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