Returns the width in pixels of the content area of the specified window.
unsigned int _WWidthP(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 displays the height and width in pixels of the active window.
Visual FoxPro Code
Copy Code | |
|---|---|
SET LIBRARY TO WWIDTHP =WDIMEN() | |
C Code
Copy 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("\nheight ="); putLong(_WHeightP(wh), 5);
_PutStr("\nwidth ="); putLong(_WWidthP(wh), 5);
}
FoxInfo myFoxInfo[] = {
{"WDIMEN", Example, 0, ""},
};
FoxTable _FoxTable = {
(FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
}; | |
See Also
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08Send feedback on this topic to the VFPX Help file project team.
2009-2017 Placed under Creative Commons licensing by Microsoft Corporation.