opflags

Updated November 2013

opflags specifies any sensible combination of the symbols below (symbols defined in ashell.def):

Symbol

Value

Description

EVW_NEXT

&h000001

Set initial focus on control following the one specified by ctlid. Generally not used, particularly if ctlid = 0, since the focus will automatically be placed on the first control within the specified parent group.

EVW_NOWAIT

&h000002

Set the focus and return (do not wait for an event). This is a bit of an oxymoron, since it directly contradicts the idea of waiting for an event, and thus is only useful in very limited circumstances, where you just want to put the focus on a control while doing some time consuming calculations.

EVW_NOWRAP

&h000004

Exit from the wait operation with EXITCODE 3 or 5 rather than wrap.

EVW_NOFOCUS

&h000008

This is another exotic switch, which eliminates the initial step of setting the focus on an appropriate control when starting the eventwait. Probably the only situation where it would be useful is if, due to the context of the program, the application knew that it wanted to start with the focus where it currently was, without knowing where that was..

EVW_NUMERIC

&h000010

Allow keyboard input.

EVW_DESCEND

&h000020

Expand scope to include grandchildren, great-grandchildren, etc.

EVW_SIBLINGS

&h000040

Expand scope to include siblings of parentid.

EVW_INFLD

 

(or)

 

EVW_EDIT

&h000080

Allow navigation keys to move the focus to editable fields, such as EDIT, COMBO, DATE/TIME and XTREE controls. Otherwise EVENTWAIT ignores controls except for buttons and controls with the MBF_TABSTOP flag explicitly set. (Standard push buttons get this flag automatically.) Note that unlike the case with buttons, when EVENTWAIT puts the focus on an editable field, it actually returns to the application with the same exitcode as if the field had been clicked (allowing the application to take over the editing operation.)

EVW_PREV

&h000100

This is the inverse of the EVW_NEXT option, and was provided mainly to satisfy some arcane notion of symmetry.

EVW_SQUELCH

&h000200

Squelch radio button exits on focus change.

EVW_TABEXIT

&h000400

This option overrides the normal behavior of the Tab and Shift+Tab, so that instead of advancing the focus, they simply exit, with exitcode 7 and -35, respectively.

EVW_ACCEL

&h000800

Allow "accelerator" keys.

EVW_RAW

&h001000

Raw keyboard input.

EVW_HAREXIT

&h002000

Exit on horizontal Arrows. Exitcodes: Left=2, ShiftLeft=-36, Right=12, ShiftRight=-38

EVW_VAREXIT

&h004000

Exit on vertical Arrows. Exit codes: Up=3, ShiftUp = -37; Down = 5; ShiftDown = -39

EVW_EXCDFOCUS

&h010000

Incoming exitcode overrides CTLID.

EVW_EXCDINOUT

&h040000

Like EVW_EXCDFOCUS; see detailed description.

EVW_CTLARROWS

&h080000

May be added to EVW_VAREXIT or VAR_HAREXIT to cause Ctrl+Arrow to return a unique exitcode (offset by -16 from the Shift+Arrow exitcodes). Without this qualifier, Ctrl+Arrow returns the same exitcode values as the arrow keys by themselves. EVW_CTLARROWS also causes Ctrl+Plus and Ctrl+Minus- (i.e. Ctrl in conjunction with the Plus and Minus keys on the numeric keypad) to return EXITCODEs -62 and -61, respectively.

EVW_CTLCLIPBD

&h100000

Causes the normal Windows clipboard shortcuts to be returned as exitcodes: ^C=-56, ^V=-57, ^X=-58. Also causes ^Z to return EXITCODE -60.

EVW_NODELAY

&h200000

Removes the timer filter that normal restricts click events for a single control to one per 1/2 second. This is normally useful for preventing (click bounce), but in some cases (like a scroll button), you may want to allow more rapid click response by specifying this flag.

EVW_ENTER

&h400000

Causes the ENTER key to return exitcode=33, instead of acting like a click on the currently focused control. This might be useful to implement a default action that was independent of the currently-focused button. Note that you can identify the currently-focused button from the returned ctlid parameter.

EVW_ULFOCUS

h00800000

Clickable static text controls are highlighted to indicate when they have the focus. The default highlight effect is a dotted line around the perimeter of the control. As an alternative, you can specify this flag (EVW_ULFOCUS), which changes the highlight effect to the combination of bold+underline. Note: PNG and GDIPLUS images are excluded from this treatment on the theory that they are amenable to a more sophisticated highlighting approach.

Hex-Decimal Values

 

History

2013 November, A-Shell 6.1.1368:  Added EVW_ULFOCUS flag