Module: WinAPI
- Extended by:
- Fiddle::Importer
- Includes:
- Fiddle::BasicTypes, Fiddle::Win32Types
- Defined in:
- lib/autocad/message_box.rb
Defined Under Namespace
Modules: MB
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.get_text_of_active_window ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/autocad/message_box.rb', line 23 def self.get_text_of_active_window hwnd = GetForegroundWindow() buf_size = GetWindowTextLength(hwnd) str = " " * (buf_size + 1) GetWindowText(hwnd, str, str.length) str.encode(Encoding.default_external) end |
Instance Method Details
#get_foreground_window ⇒ Object
19 20 21 |
# File 'lib/autocad/message_box.rb', line 19 def get_foreground_window GetForegroundWindow() end |