Module: SMSG

Defined in:
lib/vr/sysmod.rb

Constant Summary collapse

SendMessage =

SMSG

This is for Windows Messaging.

Class Methods

— sendMessage(hwnd,uMsg,wParam,lParam)

Calls SendMessage(). see Windows SDK document.
((|lParam|)) can be both type of Integer and String

— postMessage(hwnd,uMsg,wParam,lParam)

Calls PostMessage(). see Windows SDK document.
((|lParam|)) can be both type of Integer and String
Win32API.new("user32","SendMessage",["I","I","I","I"],"I")
PostMessage =
Win32API.new("user32","PostMessage",["I","I","I","I"],"I")
SendMessage2 =
Win32API.new("user32","SendMessage",["I","I","I","P"],"I")
PostMessage2 =
Win32API.new("user32","PostMessage",["I","I","I","P"],"I")

Class Method Summary collapse

Class Method Details

.postMessage(*arg) ⇒ Object



166
167
168
169
170
171
172
# File 'lib/vr/sysmod.rb', line 166

def SMSG.postMessage(*arg)
  if arg[3].is_a?(Integer) then
    PostMessage.call(*arg)
  else
    PostMessage2.call(*arg)
  end
end

.sendMessage(*arg) ⇒ Object



158
159
160
161
162
163
164
# File 'lib/vr/sysmod.rb', line 158

def SMSG.sendMessage(*arg)
  if arg[3].is_a?(Integer) then
    SendMessage.call(*arg)
  else
    SendMessage2.call(*arg)
  end
end