CTextView:GetHandle


The GetHandle method returns the handle of the GUI window attached to this CTextView object.

Syntax

handle = CTextView:GetHandle()

    handle is the handle of the GUI window.

    returns the handle, or nil if a GUI window is not attached to this object.

  

Note that the handle is a number that the operating system has assigned to a specific window. If you close the text window attached to this CTextView, then the handle is no longer valid.

Example

The following script gets the handle of the text window attached to this CTextView object, T, and then saves it to the system Registry.

handle = T:GetHandle()

-- fetch the handle of the GUI window

Reg = CRegistry:new("TextData")

-- open the Registry section "TextData"

Reg:SetWnd( "TextWindow", handle )

-- save the handle to the "TextWindow" key

Related Topics

AttachHandle

CTextView class

CRegistry:GetWnd