调试AVIN后视注册消息BUG改正记录保存

.H文件

#define ATLAS_AVP_INSERTED_MSG _T("_ATLAS_AVP_INSERTED_MSG")

。。。。。。。。。。。

public:
 virtual BOOL PreTranslateMessage(MSG* pMsg);
  virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
 UINT avin_charu_Msg ;

 

.CPP文件

 

。。。。。。。。。。。。。。。。。

BOOL CtestavinDlg::OnInitDialog()
{
 CDialog::OnInitDialog();
avin_charu_Msg=RegisterWindowMessage(ATLAS_AVP_INSERTED_MSG); 
return TRUE;  // return TRUE  unless you set the focus to a control
}

。。。。。。。。。。。。。。。。


BOOL CtestavinDlg::PreTranslateMessage(MSG* pMsg)
{
 if(pMsg->message==avin_charu_Msg)
 {
  int wmId,wmEvent;
  wmId    = pMsg->wParam;
  
  if(wmId==1)
  {
  // RETAILMSG(1, (L"=====avincharu=========."));

  }
  if(wmId==0)
  {
  // RETAILMSG(1, (L"=====avinbochu=========."));

  }
 }
 return CDialog::PreTranslateMessage(pMsg);
}

static UINT avin_charu_Msg =RegisterWindowMessage(ATLAS_AVP_INSERTED_MSG);
LRESULT CtestavinDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
 // TODO: Add your specialized code here and/or call the base class


 int wmId,wmEvent;
 wmId    = LOWORD(wParam);
 wmEvent = HIWORD(wParam);
if(message==avin_charu_Msg)//注意不能用CASE匹配,注册的进程之间可以通讯的消息必须这样写
{
 if(wmId==1)
 {
RETAILMSG(1, (L"=====avincharu1=========."));
 }
 if(wmId==0)
 {
RETAILMSG(1, (L"=====avinbochu1=========."));
 }
//RETAILMSG(1, (L"=====avincharu1111=========."));

}

 

 return CDialog::WindowProc(message, wParam, lParam);

}

你可能感兴趣的:(调试AVIN后视注册消息BUG改正记录保存)