Windows message onActivateApp
Posted on 2004-09-16
I have a problem that I can't work out.
I've created a DLL to run a program that was written in pascal.
What I want to do is send a message to another window when the pascal window becomes active. Basically its like this:
Win1 -> create pascal window through DLL
Win2 -> If activated send message to Win1
I know the handles of both Win1 and Win2. Win1 can only communicate with Win2 through the DLL (I know this isn't really the case, but for the sake of my problem it is).
I have added a message handler to the pascal window that looks like this.
if (Msg.message = WM_ACTIVATEAPP) then
if Msg.wParam > 0 then
if its becoming activated send message to other window to come to front
The message beeps are in there because I can't get it to work.
Note that if I add a handler for WM_PAINT it beeps loads, so the function is definately working and hooking the messages.
As it stands though, the window never beeps hence the WM_ACTIVATEAPP is never being sent. Is this becuase its running through a DLL?
Any help would be gratefully received. I've been chugging away on this for ages.