|
이런 함수가 있는데여
활성화된 창만 보여주는 예제인데여
여기에서 출력할때 프로세스 ID를 앞에 추가하여 출력을하고 싶거든여
어떻게 해야좋지여?
프로세스 ID만 따로 쭉 구하면 되는데 여기에 출력할때 프로세스 ID를 추가하여 출력하는것은 안되네여
BOOL CALLBACK EnumWindowsProc2(HWND hwnd, LPARAM lp)
{
char str[256];
SendMessage(hListPro,LB_RESETCONTENT,0,0);
LONG lnStyle, lnExStyle;
GetWindowText(hwnd, str, sizeof(str));
lnStyle = GetWindowLong(hwnd, GWL_STYLE);
lnExStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
if((lnStyle & WS_VISIBLE) && (lnStyle & WS_OVERLAPPEDWINDOW) &&
!(lnExStyle & WS_EX_CONTROLPARENT))
{
wsprintf(str, "%s", str);
SendMessage(hListPro2, LB_ADDSTRING, 0, (LPARAM)str);
}
return(TRUE);
}
// hListPro2 => listbox이름입니다.
|