Hi j_willy,
in which kind of application do you need this? With MFC or without? If MFC, a dialog, SDI or MDI?
I.e. if it's for a MFC dialog application it's quite easy. Just add a line like this near the top (but at least below the '#include "stdafx.h"') of the dialog's implementation file:
UINT g_uQueryCancelAutoPlay = RegisterWindowMessage( TEXT("QueryCancelAutoPlay") );
Then add a message handler for this message by adding a entry to the dialogs message map, i.e. add this somewhere between 'BEGIN_MESSAGE_MAP' and 'END_MESSAGE_MAP':
ON_REGISTERED_MESSAGE( g_uQueryCancelAutoPlay, OnQueryCancelAutoPlay )
Add a function declararation for this message handler in the dialog class declaration like this:
afx_msg LONG OnQueryCancelAutoPlay (WPARAM wParam, LPARAM lParam);
and implement it somehow like this in your dialog (here I assume the name of the dialogs class is CTestDlg, replace it with your dialog classes name):
LONG CTestDlg::OnQueryCancelAutoPlay(WPARAM wParam, LPARAM lParam)
{
return 1;
}
Hope that helps,
ZOPPO
}