Article View: borland.public.cppbuilder.nativeapi
Article #8038Re: Several ways to define 2 system-wide hotkeys, without to install keyboard-hook..
From: Remy Lebeau (TeamB)
Date: Sat, 20 Nov 2004 08:43
Date: Sat, 20 Nov 2004 08:43
36 lines
2297 bytes
2297 bytes
"Oren Halvani" <Spam@Me-Please.com> wrote in message
news:419e831e$1@newsgroups.borland.com...
> how can i do that exactly Remy..?
You are going in the wrong direction. You are checking the children windows
when you should be checking the parent windows instead. Use GetWindow()
instead of EnumChildWindows(), ie:
if( chkTaskbar->Checked )
{
HWND hTheWndToCheck;
do
{
hTheWndToCheck = hwnd;
hwnd = GetWindow(hwnd, GW_OWNER);
}
while( hwnd != NULL );
if( IsWindowVisible(hTheWndToCheck) )
{
GetWindowText(hTheWndToCheck, Count, 256);
AnsiString str = Count; if(str.IsEmpty()) return true;
lstAktiveFenster->Items->Add(AnsiString(str));
}
}
> whats wrong here ? this gives me an AV...
Your callback function is expecting the lParam to be valid a TfrmTrashHate*
pointer, but you passed in an uninitialized lParam to EnumChildWindows()
instead.
Gambit
Technical Details
Message-ID:
<419f0334$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<419ceea1@newsgroups.borland.com> <419cf173$1@newsgroups.borland.com> <419d2c69$1@newsgroups.borland.com> <419d3e01$1@newsgroups.borland.com> <419d8ce4@newsgroups.borland.com> <419dc340@newsgroups.borland.com> <419e5561$1@newsgroups.borland.com> <419e5ecc$1@newsgroups.borland.com> <419e6631@newsgroups.borland.com> <419e7adc$1@newsgroups.borland.com> <419e831e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9a94ec9a8ef193c6 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: <419ceea1@newsgroups.borland.com> <419cf173$1@newsgroups.borland.com> <419d2c69$1@newsgroups.borland.com> <419d3e01$1@newsgroups.borland.com> <419d8ce4@newsgroups.borland.com> <419dc340@newsgroups.borland.com> <419e5561$1@newsgroups.borland.com> <419e5ecc$1@newsgroups.borland.com> <419e6631@newsgroups.borland.com> <419e7adc$1@newsgroups.borland.com> <419e831e$1@newsgroups.borland.com> Subject: Re: Several ways to define 2 system-wide hotkeys, without to install keyboard-hook.. Date: Sat, 20 Nov 2004 00:43:26 -0800 Lines: 38 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: <419f0334$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1100940084 68.69.17.41 (20 Nov 2004 00:41:24 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail