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:
Creating a window using CreateWindowEx function
Displaying dimmed window behind VFP top-level form
Displaying hypertext links with the SysLink control (VFP9, Comctl32.dll)
How to make a VFP form fading out when released (GDI version)
How to make a VFP form fading out when released (GDI+ version)
Placing a button on the VFP form as a new child window
Placing On-screen Alert on top of all windows
Splash Screen for the VFP application
Using Common Controls: the Header Control
Using Month Calendar Control (VFP9, Comctl32.dll)
CreateWindowEx
    Add comment     W32 Constants      Translate this page
Creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function
Code examples:
Displaying dimmed window behind VFP top-level form
Using Month Calendar Control (VFP9, Comctl32.dll)
Placing On-screen Alert on top of all windows
How to make a VFP form fading out when released (GDI version)
How to make a VFP form fading out when released (GDI+ version)
Displaying hypertext links with the SysLink control (VFP9, Comctl32.dll)
Creating a window using CreateWindowEx function
Placing a button on the VFP form as a new child window
Splash Screen for the VFP application
Using Common Controls: the Header Control
Declaration:
HWND CreateWindowEx(
  DWORD dwExStyle,      // extended window style
  LPCTSTR lpClassName,  // registered class name
  LPCTSTR lpWindowName, // window name
  DWORD dwStyle,        // window style
  int x,                // horizontal position of window
  int y,                // vertical position of window
  int nWidth,           // window width
  int nHeight,          // window height
  HWND hWndParent,      // handle to parent or owner window
  HMENU hMenu,          // menu handle or child identifier
  HINSTANCE hInstance,  // handle to application instance
  LPVOID lpParam        // window-creation data
);
FoxPro declaration:
DECLARE INTEGER CreateWindowEx IN user32;
    INTEGER dwExStyle,;
    STRING lpClassName,;
    STRING lpWindowName,;
    INTEGER dwStyle,;
    INTEGER x,;
    INTEGER y,;
    INTEGER nWidth,;
    INTEGER nHeight,;
    INTEGER hWndParent,;
    INTEGER hMenu,;
    INTEGER hInstance,;
    INTEGER lpParam

Parameters:
dwExStyle
[in] Specifies the extended window style of the window being created

lpClassName
[in] Pointer to a null-terminated string or a class atom created by a previous call to the RegisterClass or RegisterClassEx function

lpWindowName
[in] Pointer to a null-terminated string that specifies the window name

dwStyle
[in] Specifies the style of the window being created

x, y
[in] Specifies the initial position of the window

nWidth, nHeight
[in] Specifies the width and the height, in device units, of the window

hWndParent
[in] Handle to the parent or owner window of the window being created

hMenu
[in] Handle to a menu, or specifies a child-window identifier, depending on the window style

hInstance
[in] Handle to the instance of the module to be associated with the window

lpParam
[in] Pointer to a value to be passed to the window
Return value:
If the function succeeds, the return value is a handle to the new window
Usage:
lnStyle = WS_CHILD + WS_BORDER + HDS_BUTTONS
lnStyleX = 0
lnId = VAL( SYS(3) )
lcWindowName = "hdr" + SYS(3)
hApp = GetWindowLong (_screen.HWnd, GWL_HINSTANCE)

hWindow = CreateWindow(lnStyleX, "SysHeader32",;
    lcWindowName, lnStyle, 0,0,0,0,;
    ThisForm.Hwnd, lnId, hApp, 0 )
My comment:
Through this function you can get a valid HWND and HDC (device context) values, which give you a great control over the created window. Comparing to this the windows, which you can create using the native DEFINE WINDOW, are "windowless"
Word Index links for the CreateWindowEx :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-18 12:00:00
Modified: 2010-05-18 15:31:08
Visited in last 7 days: 33
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 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.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.90.243.204)
50 sec.Example: 'How to block the ALT+TAB shortcut (WinXP)'
1.9 min.Example: 'Verifying a file using the Authenticode policy provider'
3.45 min.Example: 'How to generate GUID values'
6.52 min.Function: 'SQLManageDataSources'
8.68 hrs.Example: 'Reading and setting explicit Application User Model ID for the current process (Win7)'
8.69 hrs.Function: 'inet_ntoa'
8.7 hrs.Function: 'waveOutUnprepareHeader'
Function group: 'Windows Multimedia'
8.71 hrs.Example: 'How to perform Base64 encoding/decoding using Cryptography API Functions'
8.72 hrs.Function: 'GdipDrawRectangle'
8.75 hrs.Function: 'LogonUser'
Google
Advertise here!