Im using CreateThread for multithreading in my program. But what I am facing is that one of my multithread fails to work as the thread function needs to have more than one argument. Actually Im using EnumChildWindows in one of my thread function and thus it fails to call the callback function from the main program. Here is my code, please correct me .. Code: HWND hGG; wchar_t getWndName[200]; HANDLE hThread_A; DWORD WINAPI Auto_Thread (LPVOID hWnd) { hGG = (HWND)hWnd; for (;;) { if (IsZoomed(FindWindow(0, L"Application"))!=0) break; } hGG = FindWindow(0, L"Application"); Sleep(500); EnumChildWindows(hGG, EnumChildProc, (LPARAM)&getWndName); //Here getWndName not passed to the new thread. I think here is my problem CloseHandle (hThread_A); return 0; } //executing thread by a button press hThread_A = CreateThread (0, 0, Auto_Thread, hw, 0 , 0); // EnumChildWindows Callback function BOOL CALLBACK EnumChildProc (HWND hwChild, LPARAM lParam) { if (GetWindowText(hwChild, getWndName, 200)!=0 && wcscmp(getWndName, L"Found")==0) { // ............. } return TRUE; }