Remarks
Creates a new instance of the Spectrum class on the given parent window. This method is alternative to the Spectrum.Create method and should be used when dealing with development environments like WPF where controls don't expose a HWND.
Once created, by default the Spectrum is still not visible: you must make a call to the Spectrum.Show method in order to display it.
Note that you can have a different Spectrum for each of the allocated players.
For further details about using the component inside WPF applications refer to the Adding the component to a Visual Studio 2008 WPF project tutorial.
For further details about using the embedded Spectrum refer to the Spectrum class section.
For details about using Visual Feedbacks refer to the How to use embedded Visual Feedbacks section.
Syntax
[Visual Basic]
Public Function CreateNew (
nPlayerIndex as Int16,
hWndParent as IntPtr,
nLeft as Int32,
nTop as Int32,
nWidth as Int32,
nHeight as Int32
) as IntPtr
|
|
[C#]
public IntPtr CreateNew (
Int16 nPlayerIndex,
IntPtr hWndParent,
Int32 nLeft,
Int32 nTop,
Int32 nWidth,
Int32 nHeight
);
|
|
[C++]
public: IntPtr CreateNew (
Int16 nPlayerIndex,
IntPtr hWndParent,
Int32 nLeft,
Int32 nTop,
Int32 nWidth,
Int32 nHeight
);
|
|
Parameter
|
Description
|
|
|
nPlayerIndex
|
Number representing the zero-based index of the player that will use the Spectrum.
|
hWndParent
|
Handle of the parent window, usually the container form.
|
nLeft
|
Left position of the window, expressed in client coordinates (pixels) of hWndParent
|
nTop
|
Top position of the window, expressed in client coordinates (pixels) of hWndParent
|
nWidth
|
Width of the window, expressed in pixels
|
nHeight
|
Height of the window, expressed in pixels
|
Return value
Value
|
Meaning
|
|
|
Negative value
|
An error occurred (see the LastError property for further error details)
|
enumErrorCodes.NOERROR (0)
|
The method call was successful.
|
|