PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Actions performed by the user
  • MK_XX constants
  • VK_XX constants
  • SB_XXX constants
  • SIZE_XXX constants
  • Examples
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Optional processes: Retrieved information
Overview
WINDEV and WINDEV Mobile allow you 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 HiWord): Vertical position (Y) of mouse cursor in relation to the relevant control or window (equivalent to MouseYPos)
  • Low byte (returned by LoWord): Horizontal position (X) of mouse cursor in relation to the specified control or window (equivalent to MouseXPos)
Key pressed in the format of a MK_XXX constant
Mouse wheel (WM_MOUSEWHEEL)
  • High byte (returned by HiWord): Vertical position (Y) of mouse cursor in relation to the relevant control or window (equivalent to MouseYPos).
  • Low byte (returned by LoWord): Horizontal position (X) of mouse cursor in relation to the specified control or window (equivalent to MouseXPos).
  • High byte (returned by HiWord): Rotational direction of mouse wheel (positive number: move to the top ; negative number: move to the bottom)
  • Low byte (returned by LoWord): 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 key pressed (can be handled by Charact)
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 scrollbar
  • High byte (returned by HiWord): Position of scrollbar box
  • Low byte (returned by LoWord): Method used to move the scrollbar box, in the format of an SB_XXX constant
Display of popup menu (WM_CONTEXTMENU)
  • High byte (returned by HiWord): Vertical position (Y) of mouse cursor in relation to the relevant control or window (equivalent to MouseYPos)
  • Low byte (returned by LoWord): Horizontal position (X) of mouse cursor in relation to the specified control or window (equivalent to MouseXPos)
Note: If these values are equal to -1, the popup menu was opened by the Windows key for opening the popup menu
Handle of window or control from which the popup menu is called
Move (WM_MOVE)
  • High byte (returned by HiWord):
    - vertical position of top left corner of window in relation to the top left corner of screen (equivalent to ..Y)
    -vertical position of top left corner of control in relation to the top left corner of client area of window (equivalent to ..Y).
  • Low byte (returned by LoWord):
    - horizontal position of left corner of window in relation to the top left corner of screen (equivalent to ..X)
    - horizontal position of top left corner of control in relation to the top left corner of client area of window (equivalent to ..X).
Resize (WM_SIZE)
  • High byte (returned by HiWord): Height of control or window (equivalent to ..Height)
  • Low byte (returned by LoWord): Width of control or window (equivalent to ..Width)
Display mode of window (minimized, maximized, ...) in the format of a SIZE_XXX constant (equivalent to WinSize)
Gain of focus (WM_SETFOCUS)Handle of window or control that took focus
Loss of focus (WM_KILLFOCUS)Handle of window or control that took focus

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:
CONSTANT
        MK_CONTROL=8
        MK_LBUTTON=1
        MK_MBUTTON=16
        MK_RBUTTON=2
        MK_SHIFT=4
END

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:
EXTERN "KeyConst.WL"

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:
CONSTANT
        SB_LINEDOWN=1
        SB_LINEUP=0
        SB_LINELEFT=0
        SB_LINERIGHT=1
        SB_PAGEDOWN=3
        SB_PAGEUP=2
        SB_PAGELEFT=2
        SB_PAGERIGHT=3
        SB_THUMBPOSITION=4
        SB_THUMBTRACK=5
END

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:
CONSTANT
        SIZE_RESTORED=0
        SIZE_MINIMIZED=1
        SIZE_MAXIMIZED=2
END
Examples
The following example is used to find out the rotational direction of the mouse wheel:
// -- Optional process: Mouse wheel
Direction is int
Direction = HiWord(_EVE.wParam)
IF Direction < 0 THEN
Trace("The mouse wheel is going to the bottom")
ELSE
Trace("The mouse wheel is going to the top")
END
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
CONSTANT
SIZE_RESTORED=0
SIZE_MINIMIZED=1
SIZE_MAXIMIZED=2
END

// Add the "C:\Icons\Icon.ICO" icon into the taskbar
// when the window is minimized
IF _EVE.wParam = SIZE_MINIMIZED THEN
SysIconAdd("C:\Icons\Icon.ICO")
END

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

IF _EVE.wParam = SIZE_RESTORED THEN SysIconDelete()
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
EXTERN "KeyConst.WL"

// [Del] key up?
IF _EVE.wParam = VK_DELETE THEN
// Delete the current row?
IF YesNo("Delete the current row?") = Yes THEN
TableDelete(MySelf)
END
END
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment