The information in this article applies to:
SUMMARY
The code example below demonstrates how FOXTOOLS.FLL can be used to call
the PostMessage() function from FoxPro for Windows.
MORE INFORMATION
The FOXTOOLS.FLL file is a FoxPro application programming interface (API)
library that allows FoxPro programs to call many Windows dynamic-link
library (DLL) functions. The FOXTOOLS.WRI document explains how to use
FOXTOOLS.FLL. Both files are located in the GOODIES\FOXTOOLS subdirectory
of the main FoxPro for Windows directory.
This article demonstrates how to use PostMessage() to send a WM_SYSCOMMAND,
SC_MAXIMIZE message to the main FoxPro window. The WM_SYSCOMMAND message is
sent when the user chooses a command from the Control (system) menu or when
the user chooses the Maximize button or the Minimize button. The second
parameter specifies the type of system command requested. SC_MAXIMIZE is
sent when the Maximize command is chosen.
By using the PostMessage() function to send this message to the FoxPro window, you can "trick" FoxPro for Windows into thinking that the user chose Maximize from the Control menu. Both WM_SYSCOMMAND and SC_MAXIMIZE are constants. These constants are defined in the WINDOWS.H file, which is included with the Windows Software Development Kit (SDK). By finding the location in WINDOWS.H where WM_SYSCOMMAND and SC_MAXIMIZE are defined, you can to determine that WM_SYSCOMMAND has a hexadecimal value of "0x0112" and SC_MAXIMIZE has a hexadecimal value of "0xF030". These hexadecimal values can be converted to decimal values of 274 and 61,488 respectively.
REFERENCESMicrosoft FoxPro for Windows FOXTOOLS.WRI document Microsoft Windows Software Development Kit Microsoft Visual C++ Additional query words: VFoxWin FoxWin 2.50 foxtools api fll
Keywords : kbcode FxprgFoxtools |
Last Reviewed: August 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |