#define _WIN32_WINNT 0x0600 #define _UNICODE #define UNICODE #define WIN32_LEAN_AND_MEAN #include HWND tc = NULL; BOOL CALLBACK WinCallback(HWND hwnd, LPARAM lParam) { DWORD pid = 0; GetWindowThreadProcessId(hwnd, &pid); if(pid == lParam) { tc = hwnd; return FALSE; } else { return TRUE; } } void fix_list(HWND list) { LONG_PTR style; style = GetWindowLongPtr(list, GWL_EXSTYLE); style |= WS_EX_CLIENTEDGE; SetWindowLongPtr(list, GWL_EXSTYLE, style); SetWindowPos(list, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER); } int main() { STARTUPINFO si; PROCESS_INFORMATION pi; HWND list = NULL; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); if(!CreateProcess(L"totalcmd64.exe", NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) return 1; Sleep(1000); // FIXME EnumWindows(WinCallback, pi.dwProcessId); if(tc == NULL) return 2; do { list = FindWindowEx(tc, list, L"LCLListBox", L""); if(list == NULL) break; fix_list(list); } while(1); return 0; }