Catch synchronization messages in your main dialog class.
Prérequis
You must use Microsoft Foundation Classes to develop your application
Your application must create and register a custom window class name for notification.
Add a registered message and declare a message handler.
Find the message map in the source file for your main dialog (the name is of the same form as CMyAppDlg.cpp). Add a registered message using the static and declare a message handler using ON_REGISTERED_MESSAGE as in the following example:
static UINT WM_ULTRALITE_SYNC_MESSAGE = ::RegisterWindowMessage( UL_AS_SYNCHRONIZE ); BEGIN_MESSAGE_MAP(CMyAppDlg, CDialog) //{{AFX_MSG_MAP(CMyAppDlg) //}}AFX_MSG_MAP ON_REGISTERED_MESSAGE( WM_ULTRALITE_SYNC_MESSAGE, OnDoUltraLiteSync ) END_MESSAGE_MAP() |
Implement the message handler.
Add a method to the main dialog class with the following signature. This method is automatically executed any time the MobiLink provider for ActiveSync requests that your application synchronize. The method should call the ULSynchronize method.
LRESULT CMyAppDlg::OnDoUltraLiteSync( WPARAM wParam, LPARAM lParam ); |
The return value of this function should be 0.
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |