Using Win32 functions in Visual FoxPro Image Gallery
Window
..msdn
CloseWindow
CreateWindow
CreateWindowEx
DestroyWindow
EndTask
FindWindow
FindWindowEx
GetAncestor
GetClientRect
GetDesktopWindow
GetForegroundWindow
GetGUIThreadInfo
GetParent
GetShellWindow
GetWindow
GetWindowInfo
GetWindowPlacement
GetWindowRect
GetWindowText
GetWindowTextLength
GetWindowThreadProcessId
InternalGetWindowText
IsChild
IsIconic
IsWindow
IsWindowVisible
IsZoomed
MoveWindow
RealGetWindowClass
SetForegroundWindow
SetLayeredWindowAttributes
SetParent
SetWindowPos
SetWindowText
ShowWindow
SwitchToThisWindow
Code examples:
Accessing Adobe Reader 7.0 main menu from VFP application
Extended MessageBox Class
How to change the name and the size of the font in the MessageBox dialog
How to control Adobe Reader 9.0 (SDI mode) from VFP application
How to position the GETPRINTER() dialog
Listing child windows for the Windows desktop
Minimizing all running applications
Obtaining window class name for the main VFP window
Reading the structure of VFP main menu
Retrieveing information about the active window (even if it is not owned by the calling process)
Retrieving top-child window for the VFP form
Scanning a hierarchy of child windows down from the Windows Desktop
Scanning the hierarchy of child windows down from the main VFP window
Simple Window Viewer
Terminating all running applications from a VFP program
The window and its ancestors
Who is the first in viewing the Clipboard
Who owns the Windows Clipboard
Who owns the Windows Clipboard

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
 
DO declare
 
hWindow=GetActiveWindow()
hOwner=GetClipboardOwner()
 
? "Active window: ............", hWindow,;
    "["+GetWinText(hWindow)+"]"
 
? "_SCREEN.HWnd: .............", _screen.HWnd,;
    "["+GetWinText(_screen.HWnd)+"]"
 
? "Window owning clipboard: ..", hOwner,;
    "["+GetWinText(hOwner)+"]"
 
FUNCTION GetWinText(hWindow)
    LOCAL nBufsize, cBuffer
    nBufsize = 128
    cBuffer = Repli(Chr(0), nBufsize)
    nBufsize = GetWindowText(hWindow, @cBuffer, nBufsize)
RETURN Iif(nBufsize=0, "", Left(cBuffer, nBufsize))
 
PROCEDURE declare
    DECLARE INTEGER GetActiveWindow IN user32
    DECLARE INTEGER GetClipboardOwner IN user32
 
    DECLARE INTEGER GetWindowText IN user32;
        INTEGER hwnd, STRING @lpString, INTEGER cch
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
731 bytes  
Created: 2001-07-12 12:00:00  
Modified: 2005-04-07 19:51:53  
Visits in 7 days: 61  
Listed functions:
GetActiveWindow
GetClipboardOwner
GetWindowText
Printer friendly API declarations
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.224.75.101)
3 sec.Example: 'How to put a horizontal text scrolling on the form (a news line)'
2.05 hrs.Example: 'How to play AVI file on the _screen'
 Example: 'Retrieving list of Global Atom names'
2.73 hrs.Links
 Example: 'Tracking mouse movement to detect when to start dragging'
11.83 hrs.Function: 'WinExec'
Function group: 'Process and Thread'
 Example: 'Round FoxPro form'
 Function: 'TextOut'
18.3 hrs.Example: 'Creating a console window for Visual FoxPro application'
 Function: 'AVIStreamRelease'
Google
Advertise here!