Functions for Retrieving Window Information

Get Window ID from Current Context

Syntax

fngb__focus_win_id

Usage

gb__win_id$=fngb__win_id$(gb__event.context)

Description

This function gets the window ID from the current context.

Get Context from Window ID

Syntax

fngb__context

Usage

gb__context=fngb__context(gb__win_id$)

Description

This function gets the context the from window ID

Get Window Information Block for a Given Window ID.

Syntax

fngb__focus_winl_info

Usage

gb__win_info$=fngb__win_info$(gb__win_id$)

Description

This function gets the Window Information Block for a given window ID.

Window Information Block Template

dim gb__win_info$:"class:u(1),type:u(1),hidden:u(1),disabled:u(1),"

: +"context:u(2),eventmask:u(4),flags:u(4),focus:u(2),"

: +"x:i(2),y:i(2),w:u(2),h:u(2),title:c(16*=)"

The window information block is constructed using the following Visual PRO/5 functions:

gb__win_info$=ctrl(gb__sysgui,0,4,gb__context)
: +ctrl(gb__sysgui,0,8,gb__context)
: +bin(gb__context,2)
: +sendmsg(gb__sysgui,0,21,0,$$,gb__context)
: +sendmsg(gb__sysgui,0,22,0,$$,gb__context)
: +ctrl(gb__sysgui,0,2,gb__context)
: +ctrl(gb__sysgui,0,0,gb__context)
: +ctrl(gb__sysgui,0,1,gb__context)