Article View: borland.public.cppbuilder.nativeapi
Article #8081Re: Several ways to define 2 system-wide hotkeys, without to install keyboard-hook..
From: Oren Halvani
Date: Sat, 20 Nov 2004 22:30
Date: Sat, 20 Nov 2004 22:30
73 lines
3426 bytes
3426 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> schrieb im
Newsbeitrag news:419fb061$1@newsgroups.borland.com...
> I can't answer that until you show your actual code.
>
>
> Gambit
Remy, it's the same code you posted to me:
/******************************************************/
BOOL CALLBACK EnumWindowsCallback(HWND hwnd,LPARAM lParam)
{
TfrmTrashHate *form=(TfrmTrashHate*)lParam;
return form->Count_TaskBarWindows(hwnd);
}
bool __fastcall TfrmTrashHate::Count_TaskBarWindows(HWND hwnd)
{
char Count[256];
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));
}
}
else
{
GetWindowText(hwnd, Count, 256); AnsiString str = Count;
if(str.IsEmpty()) return true;
lstAktiveFenster->Items->Add(AnsiString(str));
}
return true;
}
void __fastcall TfrmTrashHate::cmdRefreshClick(TObject *Sender)
{
lstAktiveFenster->Clear();
EnumWindows((WNDENUMPROC)EnumWindowsCallback,(LONG)this);
lblCount_Process->Caption = "Es wurden: " +
IntToStr(lstAktiveFenster->Items->Count) + " aktive Programme/Prozesse
gefunden.";
}
/******************************************************/
why are the taskbar-programs listed so many times identical...?
Explorer (caption)
Explorer (caption)
Explorer (caption)
Explorer (caption)
Explorer (caption)
Outlook Express (caption)
Outlook Express (caption)
Outlook Express (caption)
.....
..
.
Oren
Technical Details
Message-ID:
<419fc5aa@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!in.100proofnews.com!in.100proofnews.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!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> <419f0334$1@newsgroups.borland.com> <419f08b1@newsgroups.borland.com> <419fb061$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 Reply-To: "Oren Halvani" <Spam@Me-Please.com> From: "Oren Halvani" <Spam@Me-Please.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> <419f0334$1@newsgroups.borland.com> <419f08b1@newsgroups.borland.com> <419fb061$1@newsgroups.borland.com> Subject: Re: Several ways to define 2 system-wide hotkeys, without to install keyboard-hook.. Date: Sat, 20 Nov 2004 23:30:17 +0100 Lines: 75 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 217.234.115.241 Message-ID: <419fc5aa@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1100989866 217.234.115.241 (20 Nov 2004 14:31:06 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!in.100proofnews.com!in.100proofnews.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail