PC SOFT

WINDEV的在线文档

  • Overview
  • Actions performed by the user
  • MK_XX constants
  • VK_XX constants
  • SB_XXX constants
  • SIZE_XXX constants
  • Examples
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Optional processes: Retrieved information

Overview
WinDev and WinDev Mobile give you the ability to add optional processes to the processes proposed by default for the different application elements. See Optional processes for more details.

Depending on the optional process used, specific information can be retrieved via the _EVE.LPARAM and _EVE.WPARAM variables.

Actions performed by the user
The table below presents the information returned in the different optional processes:
Optional processInformation returned in the _EVE.LParam variableInformation returned in the _EVE.WParam variable
Mouse rollover (WM_MOUSEMOVE)

Left mouse button down (WM_LBUTTONDOWN)

Left mouse button up (WM_LBUTTONUP)

Double click with the left mouse button (WM_LBUTTONDBLCLK)

Right mouse button down (WM_RBUTTONDOWN)

Right mouse button up (WM_RBUTTONUP)

Double click with the right mouse button (WM_RBUTTONDBLCLK)
  • High byte (returned by 高字节): Vertical position (Y) of the mouse cursor in relation to the relevant control or window (equivalent to 鼠标垂直位置)
  • Low byte (returned by 低字节): Horizontal position (X) of the mouse cursor in relation to the specified control or window (equivalent to 鼠标水平位置)
Key pressed in the format of a MK_XXX constant
Mouse wheel (WM_MOUSEWHEEL)
  • High byte (returned by 高字节): Vertical position (Y) of the mouse cursor in relation to the relevant control or window (equivalent to 鼠标垂直位置)
  • Low byte (returned by 低字节): Horizontal position (X) of the mouse cursor in relation to the specified control or window (equivalent to 鼠标水平位置)
  • High byte (returned by 高字节): Rotational direction of the mouse wheel (positive number: move to the top ; negative number: move to the bottom)
  • Low byte (returned by 低字节): Key pressed in the format of a MK_XXX constant
Key down (WM_KEYDOWN)
Key up (WM_KEYUP)
Key pressed in the format of a VK_XXX constant
Key pressed (WM_CHAR)ASCII code of the key pressed (can be handled by 字符)
System key down (WM_SYSKEYDOWN)
System key up (WM_SYSKEYUP)
Key pressed in the format of a VK_XXX constant
System key pressed (WM_SYSCHAR)ASCII code of the system key pressed
Horizontal scrollbar (WM_HSCROLL)
Vertical scrollbar (WM_VSCROLL)
Handle of the scrollbar
  • High byte (returned by 高字节): Position of the scrollbar box
  • Low byte (returned by 低字节): Method used to move the scrollbar box, in the format of a SB_XXX constant
Display of the popup menu (WM_CONTEXTMENU)
  • High byte (returned by 高字节): Vertical position (Y) of the mouse cursor in relation to the relevant control or window (equivalent to 鼠标垂直位置)
  • Low byte (returned by 低字节): Horizontal position (X) of the mouse cursor in relation to the specified control or window (equivalent to 鼠标水平位置)
Note: If these values are equal to -1, the popup menu was opened by the Windows key for opening the popup menu
Handle of the window or control from which the popup menu is called
Move (WM_MOVE)
  • High byte (returned by 高字节):
    - vertical position of the top left corner of the window in relation to the top left corner of the screen (equivalent to ..Y)
    - vertical position of the top left corner of the control in relation to the top left corner of the client area of the window (equivalent to ..Y).
  • Low byte (returned by 低字节):
    - horizontal position of the top left corner of the window in relation to the top left corner of the screen (equivalent to ..X)
    - horizontal position of the top left corner of the control in relation to the top left corner of the client area of the window (equivalent to ..X).
Resize (WM_SIZE)
  • High byte (returned by 高字节): Height of the control or window (equivalent to ..高度)
  • Low byte (returned by 低字节): Width of the control or window (equivalent to ..宽度)
Display mode of a window (minimized, maximized, ...) in the format of a SIZE_XXX constant (equivalent to 窗口尺寸)
Gain of focus (WM_SETFOCUS)Handle of the window or control that took focus
Loss of focus (WM_KILLFOCUS)Handle of the window or control that took focus

WinDevWindows

MK_XX constants

The MK_XXX constants are as follows:

MK_CONTROL8[Ctrl] key down
MK_LBUTTON1Left mouse button down
MK_MBUTTON16Middle mouse button down
MK_RBUTTON2Right mouse button down
MK_SHIFT4[Shift] key down

Before using these constants, you must enter the following code lines:

定义常量
MK_CONTROL8
MK_LBUTTON1
MK_MBUTTON16
MK_RBUTTON2
MK_SHIFT4
结束

WinDevWindows

VK_XX constants

The VK_XXX constants are presented in details in the "KeyConst.WL" file found in the "Personal\Extern" sub-directory of the setup directory of WinDev.

Before using these constants, you must enter the following code line:

外部代码"KeyConst.WL"

WinDevWindows

SB_XXX constants

The SB_XXX constants are as follows:
The scrollbar box was moved by:
SB_LINEDOWN1the spin button at the bottom
SB_LINEUP0the spin button at the top
SB_LINELEFT0the spin button on the left
SB_LINERIGHT1the spin button on the right
SB_PAGEDOWN3the scrollbar below the scrollbar box
SB_PAGEUP2the scrollbar above the scrollbar box
SB_PAGELEFT2the scrollbar on the left of the scrollbar box
SB_PAGERIGHT3the scrollbar on the right of the scrollbar box
SB_THUMBPOSITION4the scrollbar box
SB_THUMBTRACK5the scrollbar box

Before using these constants, you must enter the following code lines:
定义常量
SB_LINEDOWN1
SB_LINEUP0
SB_LINELEFT0
SB_LINERIGHT1
SB_PAGEDOWN3
SB_PAGEUP2
SB_PAGELEFT2
SB_PAGERIGHT3
SB_THUMBPOSITION4
SB_THUMBTRACK5
结束

WinDevWindows

SIZE_XXX constants

The SIZE_XXX constants are as follows:
SIZE_RESTORED0The window is restored
SIZE_MINIMIZED1The window is minimized
SIZE_MAXIMIZED2The window is maximized

Before using these constants, you must enter the following code line:

定义常量
SIZE_RESTORED0
SIZE_MINIMIZED1
SIZE_MAXIMIZED2
结束

Examples
WinDevWindows The following example is used to find out the rotational direction of the mouse wheel:

// -- Optional process: Mouse wheel
Direction整数型
Direction高字节事件.wParam
如果Direction小于0,那么
跟踪"The mouse wheel is going to the bottom"
否则
跟踪"The mouse wheel is going to the top"
结束

WinDevWindows The following example is used to add the window icon into the task bar when the window is minimized and to remove it when the window is maximized.

// -- Optional process: Resizing
// Declare the constants
定义常量
SIZE_RESTORED0
SIZE_MINIMIZED1
SIZE_MAXIMIZED2

结束

// Add the "C:\Icons\Icon.ICO" icon into the taskbar
// when the window is minimized
如果事件.wParamSIZE_MINIMIZED,那么
系统添加图标"C:\Icons\Icon.ICO"
结束

// Delete the "C:\Icons\Icon.ICO" icon
// when the window is restored

如果事件.wParamSIZE_RESTORED,那么系统删除图标()

WinDevWindows The following example is used to delete the current row from a table when the [Del] key is pressed:

// -- Optional process: Key up
// Include the "KeyConst.wl" file that contains
// the standard Windows constants
外部代码"KeyConst.WL"

// [Del] key up?
如果事件.wParamVK_DELETE,那么
// Delete the current row?
如果是否对话框"Delete the current row?")=是,那么
表格删除(我自己)
结束
结束