🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8170

Re: Several ways to define 2 system-wide hotkeys, without to install keyboard-hook..

#8170
From: Oren Halvani
Date: Fri, 19 Nov 2004 21:30
59 lines
2837 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> schrieb im
 Newsbeitrag news:419e5ecc$1@newsgroups.borland.com...

> You reintroduced the same bug that I already told you about earlier.  Use
> the '&' operator instead of the '&&' operator.
>
>
> Gambit


sorry the && to & was a Copy 'n Paste mistake..

it stills wired...

now i get only 2 windows and they are in the SystemTray NOT
in the TaskBar...what do i do again wrong ?

/*******************************************************/
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)
   {
      if(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_APPWINDOW)
      {
        GetWindowText(hwnd, 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.";
}
/*******************************************************/


Oren
Technical Details
Message-ID: <419e6631@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
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>

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>
Subject: Re: Several ways to define 2 system-wide hotkeys, without to install keyboard-hook..
Date: Fri, 19 Nov 2004 22:30:39 +0100
Lines: 61
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.123.210
Message-ID: <419e6631@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1100899889 217.234.123.210 (19 Nov 2004 13:31:29 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail