I have been working on a program which requires to retrieve the names of all the current windows on the desktop. I can retrieve the name using the Windows API function GetWindowText(). But i require a function to retrieve the handles to all the windows. I want to know which that function is. Please guide me.

what project...a virus...???...i need to know...

@salem :
i apologise for cross-posting. As such i was confused in which forum to post. Hence i did so. however i didnt read the forum rules which was my mistake.

@ cikara21 : i didnt say any project. Its just a program asked by our lecturer : To list out all the currently working windows and to perform certain functions on them.

@mosaicfuneral : thanks for your answer.

Anyways, i have figured out a function EnumWindows() which seeemingly would work out for me.