DDE notifications can be used through OLE Automation, but they must be set using specific methods.
To request DDE notifications through OLE Automation:
1. Create a notification window to receive the formatted message from Imagenation. (Its handle will have to be passed to the RegisterNotify method.) Then, define how that window will handle change messages.
Tip: Creating notification windows.
2. Register the notifications with a call to RegisterNotify. Note that, unlike in DDEML, a notification can be set up on a specific objectID, and notification IDs are used.
Using the RegisterNotify method
3. The client can then act when it gets a change message for the notification object. The format of the message is the same as that of the DDE notifications, except that the notify ID is inserted at the beginning of the message.
For example, if a client application were to be notified about a Hotspot Activation, the DDE notification data would be as follows:
NotifyIM -- HotspotActivated
(HWND:docWinID) (LYR:layerID) (XY:x y) (HID:hotspotID) (DATA)data
Using OLE, the notification data would be as follows:
(NOTIFYID:4) (HWND:docWinID) (LYR:layerID) (XY:x y) (HID:hotspotID) (DATA)data
4. Unregister notifications as part of the shut down procedure by calling UnregisterNotify.
Using the UnregisterNotify method
The DDE NotifyIM -- MenuIntercept notification must be followed by the OLE Automation InterceptMenuAction method. For details about it, click Using the InterceptMenuAction method.
See also
Using DDE transactions through OLE Automation: Overview