Start Menu Advise

3270 5250 VT
Yes Yes Yes

The Start Menu Advise function allows a client application to process a user defined routine when the menu item that is added by the client application, is selected. After using this function, the client receives DATA messages indicating which menu item is selected.

The client sends the following command to begin a menu advise.
PostMessage( hServerWnd,
             WM_DDE_ADVISE,
             hClientWnd,
             PackDDElParam(WM_DDE_ADVISE,
             hOptions,aSELECTMENU));
where:
hOptions
Is a handle to a Windows global memory object with the following structure:
typedef struct tagOPTIONS
{
 unsigned reserved:14;       // Reserved
 unsigned fDeferUpd:1;       // Send notification only
                             // (Must be 0)
 unsigned fAckReq:1;         // Client will ACK all notices
                             // (Must be 1)
 WORD     cfFormat;          // Always CF_DSPTEXT
}  OPTIONS,FAR *lpOPTIONS;
aSELECTMENU

Identifies a menu advise as the item.