Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Titles of all open Windows

Posted on 1999-08-03
12
Medium Priority
?
173 Views
Last Modified: 2010-04-04
Hi ! Could you give me an example of getting the Window
Title of all open Windows ?

thank you
ItsMe
0
Comment
Question by:ItsMe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
  • +1
12 Comments
 
LVL 2

Expert Comment

by:CalvinDay
ID: 1392687
BlackDeath should get the credit for this:

var
  bCount: Byte;

function MyEnumWindowsProc(h: HWND; p: Longint): longBool; stdcall;
var
  Caption:array [0..255] of char;
  i:integer;
begin
  i:=GetWindowTextLength(h);
  GetWindowText(h,Caption,255);
  if Caption<>'' then
    form1.listbox1.items.add(Caption);
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  li: Longint;
begin
  EnumWindows(@MyEnumWindowsProc, li);
end;

0
 
LVL 10

Expert Comment

by:viktornet
ID: 1392688
Here is how!

function GetWindows(Handle : HWND; lParam : LPARAM) : Boolean; stdcall;
var
  Title : string;
begin
  SetLength(Title, GetWindowTextLength(Handle));
  GetWindowText(Handle, PChar(Title), Length(Title));
  if Title <> '' then TListBox(lParam).Items.Add(Title);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
     ListBox1.Clear;
     EnumWindows(@GetWindows, LPARAM(ListBox1));
end;

..-=ViKtOr=-..
0
 

Author Comment

by:ItsMe
ID: 1392689
Hi Viktor ! The question is alreday answered ! The points are for
BlackDeath. Now I can't delete the question any more to give him
the points ... hoepfully he reads this message ...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 10

Expert Comment

by:viktornet
ID: 1392690
Where is BlackDeath? I don;t see him..

if he reads this, then what up dawg? ;)

..-=ViKtOr=-..
0
 
LVL 1

Accepted Solution

by:
BlackDeath earned 80 total points
ID: 1392691
calvin - that's nice of u.
viktor - errereverythingyfinehicbelchpuketheboozebiggrin°*.
ItsMe - thanx.

cheerio,

BlackDaniels.

0
 
LVL 10

Expert Comment

by:viktornet
ID: 1392692
>>BlackDeath should get the credit for this:
oh i see...
>>viktor - errereverythingyfinehicbelchpuketheboozebiggrin°*.
??
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1392693
hi, vik -
just wanted 2 state i was quite fine again (i.e. quite pissed)
wanna have 40 pts? (that's half of this one)
i could ask ya a question u've gotta answer...

;-)

BlackDeath.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1392694
hmm... i don want ne ptz... i didnt c dad da comment mentioned ur name.. sorry...
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1392695
viknoprob - cross ur fingers - i'm goin' 4 the eclipse. 2day's target'll b karlsruhe & 2morrow i'm gonna b blind...
love ya all...

BlackDeath.

p.s.: cheers.
0
 

Author Comment

by:ItsMe
ID: 1392696
Hi ! I'll go to Karlsruhe tomorrow, too !
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1392697
hi, itsme.

bad luck - ur mail came 3 minutes 2 late. @3:15pm i was off.
otherwise we could've made an appointment.
maybe 30.06.2001 in spain... ;-)

BlackDeath.

btw: it was great wasn't it? coolest was the effect of rapidly darkening. w/out a telescope, there's 2 little 2 c from the corona & its specific characteristics.
anyway - it was worth the way down (i'm from lower saxony - the way back took us 11 hours.)

h.a.n.d.
BlackDeath.
0
 

Author Comment

by:ItsMe
ID: 1392698
We needed 7 hours back. The way to Karlsruhe was about 4 hours. I was there with the Astro AG of my shool. It was really cool. The best was the shadow and the riamond-ring. My techer isn't that technical. Today I heared that is Video Cam
has been on Standby and not in the record mode !!! But we took lots of photos and we had more than one cam ... Of course we had telescopes (with our self-made sun filters).

cu
ItsMe
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question