J'ai fait un EnumChildWindows, et ca marche, mais l'achitecte logiciel dit c'est dégueulasse.
J'ai avancé, mais là j'ai un autre souci avec le hook (instancié par IE).
(Je reprends un produit déjà développé par ma boite.)
J'ai un :
const LRESULT sendResult = ::SendMessageTimeout(hwndApplet,
MON_ID_DE_MSG,
wparam,
lparam,
SMTO_ABORTIFHUNG | SMTO_BLOCK,
5000, // 5 second timeout
&responsePtr);
La callback dans IE est :
LRESULT CALLBACK myCallWndProcRetCallback(int nCode, WPARAM wParam, LPARAM lParam) {
if ( nCode == HC_ACTION && lParam != NULL) {
const CWPRETSTRUCT* const msg = reinterpret_cast<CWPRETSTRUCT*>(lParam);
if (msg->message == MON_ID_DE_MSG) {
// traitement
POINT point;
POINTSTOPOINT(point, msg->lParam);
processMessage(msg->hwnd, msg->wParam, point);
}
}
return ::CallNextHookEx(g_callWndProcRetHook, nCode, wParam, lParam);
}
Mon pb est que msg->hwnd dans le hwnd de la top-level de IE (IEFrame) et pas hwndApplet.
Ai-je manqué une subtilité sur les hook ?
Merci