Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to declare the FORM_INFO_1 Structure
Message
From
26/07/2001 10:23:28
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00535645
Message ID:
00535677
Views:
16
>Hi!
>
>These seems are integers:
>iif(height<0,65536+height,height)*65536+iif(width<0,65536+width,width), where width and height are signed word values.
>
>HTH.
>
>>I am trying to use the Struct class to setup custom form sizes on WIN2000/XP machines. How is the FORM_INFO_1 structure setup? The third parameter is 'SIZEL Size' and the fourth is 'RECTL ImageableArea'. I am at a complete loss and cannot seem to find any examples. Thanks!

No, a SIZEL is two Longs:

cx As Long
cy As Long

8 bytes.

RECTL is 4 Longs:

Left As Long
Top As Long
Right As Long
Bottom As Long

16 bytes.


I don't know how to define the structure with Christof's tool, but I've done it before using CLSHeap; it's a 28 byte buffer allocated in a VFP string memvar (you need to allocate the string in a static buffer) and parse it as follows:
  lpszName (4 bytes, used as a pointer NumToDWORD(oHeap.AllocString(cPrinterName)))
  cx       (4 bytes NumToDWORD(nXLen))
  cy       (4 bytes NumToDWORD(nyLen))
  Left     (4 bytes NumToDWORD(nLeftPos))
  Top      (4 bytes NumToDWORD(nTopPos))
  Right    (4 bytes NumToDWORD(nRightPos))
  Bottom   (4 bytes NumToDWORD(nBottomPos))
It couldn't be that tough to define with STRUCT - I just don't use it.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform