Class: Fzeet::ClientDC

Inherits:
Handle
  • Object
show all
Includes:
DCMethods
Defined in:
lib/fzeet/windows/core/Common.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DCMethods

#background, #background=, #color, #color=, #fillRect, #line, #move, #select, #sms, #text, #textExtent

Constructor Details

#initialize(window) ⇒ ClientDC

Returns a new instance of ClientDC.



306
307
308
# File 'lib/fzeet/windows/core/Common.rb', line 306

def initialize(window)
	@handle = Windows.DetonateLastError(FFI::Pointer::NULL, :GetDC, (@window = window).handle); attach
end

Instance Attribute Details

#windowObject (readonly)

Returns the value of attribute window.



310
311
312
# File 'lib/fzeet/windows/core/Common.rb', line 310

def window
  @window
end

Instance Method Details

#disposeObject



312
# File 'lib/fzeet/windows/core/Common.rb', line 312

def dispose; Windows.ReleaseDC(@window.handle, @handle); detach end