HWND hwndt;
hwndt = FindWindow(NULL,"Windows Task Manager");
here FindWindow funnction not work in c language its returns NULL yes i know i can use first perameter also but i wanna use second perameter titel in this function i use dev c++ compiler and also add to project user32.a lib tell me why its not work or any other way for it thx :)

6 Years
Discussion Span
Last Post by adityatandon

here FindWindow funnction not work in c language

Ummmm... FindWindow is a Win32 C function. It returned NULL because it most likely did not find a window named "Windows Task Manager". Read up on the API documentation.


Try using EnumWindows function. It sends you the information from all the current windows. Then you will see if you have a window titled "Windows Task Manager"


This is a windows (win32) API programming question, not a C question.

FindWindow() returns NULL if it can't find a window matching the supplied arguments.

And yes, are you sure that the Windows Task Manager was even open when u ran this program ???

Edited by adityatandon

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.