Difference between revisions of "IC Python API:RLPy RWinMessageCallback"

From Reallusion Wiki!
Jump to: navigation, search
(Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} ==Inheritance== This class inherits public member functions from: *RLPy.RCallback =...")
 
m
Line 1: Line 1:
 
{{TOC}}
 
{{TOC}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
==Inheritance==
+
{{last_modified}}
This class inherits public member functions from:
+
 
*[[IC_Python_API:RLPy_RCallback|RLPy.RCallback]]
+
== Description ==
==Detailed Description==
+
 
This class is used to register callbacks for windows messages.
+
This is the base class for registering callback function for windows messages.
<syntaxhighlight lang="Python">
+
 
 +
=== Inheritance ===
 +
 
 +
[[IC_Python_API:RLPy_RWinMessageCallback|RWinMessageCallback]]> [[IC_Python_API:RLPy_RCallback|RCallback]]
 +
 
 +
== Member Functions ==
 +
 
 +
=== OnWinMsgReceieved ===
 +
 
 +
The callback function for windows messages. It is called when [[IC_Python_API:RLPy_RWinMessageCallback|RWinMessageCallback]] receive a windows message.
 +
 
 +
==== Parameters ====
 +
:'''strMsg''' [IN] Message name - string
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 
class MyWinMessageCallback(RLPy.RWinMessageCallback):
 
class MyWinMessageCallback(RLPy.RWinMessageCallback):
 
  def __init__(self):
 
  def __init__(self):
Line 17: Line 31:
 
mydialog.RegisterNativeEventCallback(mycallback)
 
mydialog.RegisterNativeEventCallback(mycallback)
 
</syntaxhighlight>
 
</syntaxhighlight>
==Member Functions==
 
===OnWinMsgReceieved===
 
<syntaxhighlight lang="Python">
 
RLPy.RWinMessageCallback.OnWinMsgReceieved ( self, strMsg )
 
</syntaxhighlight>
 
Callback for window message received.
 
====Parameters====
 
<div style="margin-left: 2em;">
 
 
'''strMsg''' [IN] message name - string
 
</div>
 

Revision as of 02:06, 24 April 2020

Main article: Modules.
Last modified: 04/24/2020

Description

This is the base class for registering callback function for windows messages.

Inheritance

RWinMessageCallback> RCallback

Member Functions

OnWinMsgReceieved

The callback function for windows messages. It is called when RWinMessageCallback receive a windows message.

Parameters

strMsg [IN] Message name - string
1 class MyWinMessageCallback(RLPy.RWinMessageCallback):
2  def __init__(self):
3    RLPy.RWinMessageCallback.__init__(self)
4  def OnWinMsgReceieved(self, strMsg):
5    print("WinMsg is" + strMsg)
6 
7 mydialog = RUi.CreateRDialog()
8 mycallback = MyWinMessageCallback()
9 mydialog.RegisterNativeEventCallback(mycallback)