By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,475 Members | 1,626 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,475 IT Pros & Developers. It's quick & easy.

DLLs and CallWndRetProc and Timers

P: n/a
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?
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Lindsay wrote:
[OT redacted]

Yeah, my copy of the standard doesn't describe CallWndRetProc(). Try
asking in a MS newsgroup (ms.public.*)

Jul 23 '05 #2

P: n/a
It should. I only have the standard edition too.
Jul 23 '05 #3

P: n/a
Lindsay wrote:
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".
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.