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 :)

Recommended Answers

All 4 Replies

Member Avatar

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.

yes but why its not work i write right function

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 ???

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.