Article View: borland.public.cppbuilder.nativeapi
Article #4613Re: Windows Shutdown Replacement
From: Remy Lebeau (TeamB)
Date: Wed, 28 Dec 2005 17:50
Date: Wed, 28 Dec 2005 17:50
30 lines
2534 bytes
2534 bytes
"Tom" <tom@net.com> wrote in message news:43b26430$1@newsgroups.borland.com... > Because I have the same options but I also have a TimeEdit > so any of this options can be executed at desired time What do you mean exactly? Are you providing a timeout value, ie "Execute such-and-such option in NN seconds"? Or are you implementing an absolute timer value, ie "Execute such-and-such option at NN:NN:NN AP on NN/NN/NNNN"? If the former, then I can understand wanting to replace/augment the dialog. But if the latter, then why not provide that type of configuration inside your own application completely separately from the OS's dialog? Again, I ask, what EXACTLY are you trying to accomplish? > and that's why I wanted to replace the standard dialog with > my application, I thought it would be nice to call my application > via Start->Turn Off Computer. Rather than replace the existing dialog altogether, you can try keeping the existing dialog and just alter it directly as needed. Write a DLL that calls the SetWindowsHookEx() function to install a WH_CBT hook into the OS. When the DLL receives a HCBT_ACTIVATE notification, you can check if the specified HWND is the dialog or not, and if so then alter it any way you wish, such as by adding additional controls to it. You can also use a WH_CALLWNDPROC and/or WH_CALLWNDPROCRET hook to respond to messages that are issued for your extra controls. Gambit
Technical Details
Message-ID:
<43b2cfcc$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!logbridge.uoregon.edu!xmission!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43ad3757@newsgroups.borland.com> <43ae6026@newsgroups.borland.com> <43afd98b$1@newsgroups.borland.com> <43b25917$1@newsgroups.borland.com> <43b26430$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2724a76b8d806cf8 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <43ad3757@newsgroups.borland.com> <43ae6026@newsgroups.borland.com> <43afd98b$1@newsgroups.borland.com> <43b25917$1@newsgroups.borland.com> <43b26430$1@newsgroups.borland.com> Subject: Re: Windows Shutdown Replacement Date: Wed, 28 Dec 2005 09:50:02 -0800 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <43b2cfcc$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1135792076 68.69.17.41 (28 Dec 2005 09:47:56 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!logbridge.uoregon.edu!xmission!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail