This installation includes a complete application with source code written in Delphi 5.
Suggestion, correction and further example applications are welcome
MSG = WM_MBRULER_GENERELL
Checking version of remote interface
wParam = GENERELL_DETECTVERSION If the result is 1 the the interface versions are equal, if the result is 0, the interface versions differ,a connection should not be established!. |
Connect remote client to MB-Ruler
wParam = GENERELL_ADDCLIENT If the result is 1 the the connection is established. |
Disconnect remote client from MB-Ruler
wParam = GENERELL_DELCLIENT Disconnects the remote application from MB-Ruler. |
MSG = WM_MB_RULER_RULER
Set new center of the ruler in absolute coordinates
wParam = RULER_MOVE_ABS |
Move center of the ruler in relative coordinates
wParam = RULER_MOVE_REL |
Set new orientation of the ruler
wParam = RULER_ROTATE_ABS |
Change orientation of the ruler
wParam = RULER_ROTATE_REL |
Show/hide the ruler
wParam = RULER_SHOW |
Verification for connection request of remote client
wParam = GENERELL_ADDCLIENT The result returned by the remote client must be the window handle of the remote client. |
MSG = WM_MB_RULER_RULER
Sending center of the ruler in absolute coordinates
wParam = RULER_POS |
Sending orientation of ruler
wParam = RULER_ANGLE |
Sending calculated distance
wParam = RULER_CALC_DISTANCE |
Sending calculated angle
wParam = RULER_CALC_ANGLE |
Sending calculated x1 coordinates
wParam = RULER_CALC_DIST1 |
Sending calculated x2 coordinates
wParam = RULER_CALC_DIST2 |
Call
SendMessage(MBRulerHandle, WM_MBRULER_GENERELL, GENERELL_DETECTVERSION, REMOTEINTERFACE_VERSION);
If the result is 1, the interface version is equal and you can connect to MB-Ruler. Then call
SendMessage(MBRulerHandle, WM_MBRULER_GENERELL, GENERELL_ADDCLIENT, RemoteApplicationWindowHandle);
to connect to the ruler.
MB-Ruler will recheck the request by sending
SendMessage(RemoteApplicationWindowHandle, WM_MBRULER_GENERELL, GENERELL_ADDCLIENT, MBRulerHandle);
The remote application must respond with RemoteApplicationWindowHandle as the result. Only if this check is
handled correctly, the ruler accepts requests and sends information.
While an application is connected to MB-Ruler the text MB-Ruler remote interface active is displayed in the upper left corner of the screen in the unregistered version.