IPBX_VisualObject interface:
CreateControl method
Description
Creates a window control and returns its handle to the PowerBuilder
VM.
Syntax
|
1 |
CreateControl(DWORD <span>dwExStyle</span>, LPCTSTR <span>lpWindowName</span>, DWORD <span>dwStyle</span>, int <span>x</span>, int <span>y</span>, int <span>nWidth</span>, int <span>nHeight</span>, HWND <span>hWndParent</span>, HINSTANCE <span>hInstance</span>) |
|
Argument |
Description |
|---|---|
|
dwExStyle |
The extended window style |
|
lpWindowName |
The window name |
|
dwStyle |
The window style |
|
x |
The horizontal position of the window |
|
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 window |
|
hInstance |
The handle of the application instance |
Return Values
HWND.
Examples
This is part of a visual extension example available
on the Sybase Web site:
|
1 |
LPCTSTR CVisualExt::GetWindowClassName()<br>{<br>   return s_className;<br>}<br> <br>HWND CVisualExt::<span>CreateControl</span><br>(<br>   DWORD dwExStyle, // extended window style<br>   LPCTSTR lpWindowName, // window name<br>   DWORD dwStyle, // window style<br>   int x, // horizontal position of window<br>   int y, // vertical position of window<br>   int nWidth, // window width<br>   int nHeight, // window height<br>   HWND hWndParent, // handle to parent or owner window<br>   HINSTANCE hInstance // handle to application instance<br>)<br>{<br>   d_hwnd = CreateWindowEx(dwExStyle, s_className,<br>      lpWindowName, dwStyle, x, y, nWidth, nHeight,<br>      hWndParent, NULL, hInstance, NULL);<br> <br>   ::SetWindowLong(d_hwnd, GWL_USERDATA, (LONG)this);<br> <br>   return d_hwnd;<br>} |
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