Skip to content

Latest commit

 

History

History
106 lines (80 loc) · 3.4 KB

CreateWindowEx.md

File metadata and controls

106 lines (80 loc) · 3.4 KB

Home

Function name : CreateWindowEx

Group: Window - Library: user32


Creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function


Code examples:

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
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)
Using Month Calendar Control (VFP9, Comctl32.dll)
Displaying dimmed window behind VFP top-level form

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


Comments:

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"