//---------------------------------------------------------------------------
#include <vcl.h>
#include <windows.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
BOOL CALLBACK EnumWindowsProc(HWND hwnd, DWORD lParam)
{
char Name[255];
PCHAR p;
p=Name;
//ShowMessage(p);
if(!IsWindowEnabled(hwnd))
{
GetWindowTextA(hwnd,Name,255);
Form1->chklst1->Items->Add(Name);
}
}
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn1Click(TObject *Sender)
{
EnumWindows((WNDENUMPROC)EnumWindowsProc,0);
}
//---------------------------------------------------------------------------