DLLs and CallWndRetProc and Timers

L

Lindsay

I'm using the CallWndRetProc in a DLL to monitor for Explorer Windows.
Basically I'm using this procedure to find the Explorer windows (checking
for "ExploreWClass" and "CabinetWClass" classes) and adding their hwnd to an
array. The timer (set to 1 second interval) goes through the entire array
decrementing a timer for each hwnd. When the timer reaches zero, the window
is minimized. The CallWndRetProc uses the WM_CREATE to add the hwnd,
WM_DESTROY to remove the hwnd, and checks the Active/Inactive state. If the
hwnd becomes Active, the timer is reset and the window is ignored. When the
hwnd becomes Inactive the timer starts decrementing the timer for that hwnd.

Although the DLL works, I'm wondering if I've gone about this the right way.
I've never put a Windows Hook procedure in a DLL before, but it's neccessary
for system wide hooking of this kind.

Can anybody see a potential problem with this method?
 
R

red floyd

Lindsay said:
It should. I only have the standard edition too.

I should have been more clear. My copy of the ISO C++ Standard does not
discuss CallWndRetProc(). It is a MS-Windows specific function, and as
such is Off-topic in this newsgroup.

Please try a newsgroup beginning with "microsoft.public".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top