_WLeftP( ) API Library Routine

Returns the position on the screen in pixels where the left edge of the window is located.

unsigned int _WLeftP(WHANDLE wh)
WHANDLE wh;            /* Window handle. */

Remarks

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.

Example

The following example shows the position in pixels of the active window.

Visual FoxPro Code

SET LIBRARY TO WLEFTP
=WPOSITION()

C Code

#include <pro_ext.h>

void putLong(long n, int width)
{
   Value val;

   val.ev_type = 'I';
   val.ev_long = n;
   val.ev_width = width;

   _PutValue(&val);
}

void FAR Example(ParamBlk FAR *parm)
{
   WHANDLE wh = _WOnTop();

   _PutStr("\ntop   ="); putLong(_WTopP(wh), 5);
   _PutStr("\nleft ="); putLong(_WLeftP(wh), 5);
   _PutStr("\nbottom ="); putLong(_WBottomP(wh), 5);
   _PutStr("\nright  ="); putLong(_WRightP(wh), 5);
}

FoxInfo myFoxInfo[] = {
   {"WPOSITION", Example, 0, ""},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};

See Also

Reference

_WBottomP( ) API Library Routine
_WHeightP( ) API Library Routine
_WRightP( ) API Library Routine
_WTopP( ) API Library Routine
_WWidthP( ) API Library Routine

Other Resources

API Library Construction