CreateControl
Description
Creates a window control and returns its handle to the
PowerBuilder VM.
Syntax
|
1 |
CreateControl(DWORD dwExStyle, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HINSTANCE hInstance) |
|
Argument |
Description |
|---|---|
|
dwExStyle |
The extended window style |
|
lpWindowName |
The window name |
|
dwStyle |
The window style |
|
x |
The horizontal position of the |
|
y |
The vertical position of the window |
|
nWidth |
The window’s width |
|
nHeight |
The window’s height |
|
hWndParent |
The handle of the parent or owner |
|
hInstance |
The handle of the application |
Return value
HWND.
Examples
This is part of a visual extension example available on the Appeon
website:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
LPCTSTR CVisualExt::GetWindowClassName() { return s_className; } HWND CVisualExt::CreateControl ( DWORD dwExStyle, // extended window style 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 HINSTANCE hInstance // handle to application instance ) { d_hwnd = CreateWindowEx(dwExStyle, s_className, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, NULL, hInstance, NULL); ::SetWindowLong(d_hwnd, GWL_USERDATA, (LONG)this); return d_hwnd; } |
Usage
The window must be registered before you call
CreateControl.
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest