dddw窗口如何使得第一项在第一次选中可以触发事件

dddw窗口如何使得第一项在第一次选中可以触发事件,我试了,不管是在itemchange事件还是doubleclick事件中都不行,如果在click事件中写则一点击下拉框就触发事件。 我用rowfocuschanged()和rowfocuschanging()都试了,还是不行,选择第一行时没有触发事件。

------华软网友回答------ 对于DDDW不能直接使用CLICK事件,需要借助PBM_COMMAND事件,请参考下文:

http://search.csdn.net/Expert/topic/304/304632.xml?temp=.6629145

/* 新建数据窗口事件如ue_event,事件ID为pbm_command 事件ID 2048 //子数据窗口中的行焦点发生变化 1281 //子数据窗口中的点击事件 2314 //子数据窗口中的右键单击 2311 //子数据窗口中的鼠标移动 2313 //左键UP 769  //子数据窗口检索结束 2339 //PageDown/PageUp键按下 */ DataWindowChild ldw_my String ls_object,ls_temp Long ll_dddw,ll_event//ll_dddw指明操作的子数据窗口,ll_event指明触发的事件

ll_dddw = Message.LongParm//由LongParm获得操作的子数据窗口 ll_event = Message.WordParm//由WordParm获得触发的事件ID

GetChild( "c_uname", ldw_my )//获得指定列的子数据窗口

if intlow(ll_dddw) = handle(ldw_my) then   if IntHigh(ll_event) = 1281 then//1281为鼠标单击事件ID      ls_object = ldw_my.GetObjectAtPointer()      ls_temp = left(trim(ls_object),3)      Choose case ls_temp     case "b_1" //如果是增按钮   messagebox("提示","添加数据")       case "b_2"         messagebox("提示:","编辑数据")       Case "b_3"   messagebox("提示:","哈哈~~")      End choose    End if End if

更多资料请见下帖:

http://community.csdn.net/Expert/topic/3538/3538708.xml?temp=.3158075

转载于:https://www.cnblogs.com/ftian26977863/p/10407914.html

好的,以下是一个基本的示例程序,它可以在显示屏中央打开一个大小可调节的窗口。 ``` ; 8086 Assembly program to create a resizable window in the center of the screen .model small .stack 100h .data rows dw 10 ; default number of rows cols dw 20 ; default number of columns x dw ? y dw ? width dw ? height dw ? buffer db 32000 dup (?) ; video buffer window db 100 dup (?) ; window buffer .code main proc mov ax, @data mov ds, ax ; Get the screen mode mov ah, 0fh int 10h mov x, ax ; Calculate the position and size of the window mov ah, 0 mov al, x mul cols mov width, ax mov ah, 1 mov al, x mul rows mov height, ax sub height, 2 ; account for title bar and border mov x, (80 - width) / 2 mov y, (25 - height) / 2 ; Draw the window mov si, offset window mov cx, cols mov dx, rows mov ah, 6 mov bh, 0 mov bl, 15h ; white on black mov bp, si int 10h ; Wait for a key press mov ah, 0 int 16h ; Resize the window mov ah, 0fh int 10h mov x, ax mov ah, 0 mov al, x div cols mov rows, ax mov cols, dl ; Calculate the new position and size of the window mov ah, 0 mov al, x mul cols mov width, ax mov ah, 1 mov al, x mul rows mov height, ax sub height, 2 ; account for title bar and border mov x, (80 - width) / 2 mov y, (25 - height) / 2 ; Clear the old window mov si, offset window mov cx, cols mov dx, rows mov ah, 6 mov bh, 0 mov bl, 0 ; black on black mov bp, si int 10h ; Draw the new window mov si, offset window mov cx, cols mov dx, rows mov ah, 6 mov bh, 0 mov bl, 15h ; white on black mov bp, si int 10h ; Wait for a key press mov ah, 0 int 16h mov ah, 4ch int 21h main endp end main ``` 以上代码使用了BIOS中断来显示窗口,具体实现如下: 1. 首先使用中断10h的0fh功能来获取当前的屏幕模式,并通过模式和列数计算窗口的宽度。然后通过模式和行数计算窗口的高度,并减去标题栏和边框的高度。 2. 计算窗口的位置,使其在屏幕中央居中。 3. 使用中断10h的6号功能来在屏幕上绘制一个矩形,代表窗口。在这里,我们使用一个大小为100的缓冲区来存储窗口,然后将其传递给中断10h来绘制。 4. 等待用户按下一个键。 5. 获取窗口的新大小,即行数和列数。 6. 重新计算窗口的位置和大小。 7. 使用中断10h的6号功能来清除旧窗口。 8. 使用中断10h的6号功能来绘制新窗口。 9. 等待用户按下一个键。 10. 退出程序。 请注意,以上代码仅仅是一个示例,还有很多改进的余地。如果您想更深入地了解8086汇编语言或BIOS中断的使用,可以参考相关的书籍和文档。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值