bonjour,
j'utilise dans une application une methode SetNotifyWindowMessage :
qui est je pense assez ressemblante a RegisterWindowMessageSetNotifyWindowMessage sets up the instance to send window messages to a specified window.
HRESULT SetNotifyWindowMessage(
HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);
et donc j'utilise ces 2 fonctions dans mon OnInitialUpdate()
j''ai essayé ensuite d'intercepter mon message dans PreTranslateMessage:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 RegisterWindowMessage("WM_RECOEVENT"); //ou m_cpV->SetNotifyWindowMessage(AfxGetMainWnd()->m_hWnd, WM_RECOEVENT , 0, 0); // avec #define WM_RECOEVENT WM_APP+101
mais rien ne s'affiche
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 if(pMsg->message == WM_RECOEVENT){ AfxMessageBox("OK");![]()
pourquoi?
Partager