- Code: Select all
HWND hParent =::FindWindow("#32770","Invite to Room");
HWND hList = ::FindWindowEx(hParent, 0, "SysListView32", NULL);
bool bCheck=true;
int count=(int)::SendMessage(hList, LVM_GETITEMCOUNT, 0, 0);
LV_ITEM lvi;
lvi.state=UINT((int(bCheck) + 1) << 12);
lvi.stateMask=LVIS_STATEIMAGEMASK;
for(int i=0; i<count; i++)
{
WPARAM ItemIndex=(WPARAM)i;
::SendMessage(hList,LVM_SETITEMSTATE,ItemIndex,(LPARAM)&lvi);
}
HWND button = ::FindWindowEx(hParent, 0, "button", "Invite");
::SendMessage((HWND)button,WM_LBUTTONDOWN,1,1);
::SendMessage((HWND)button,WM_LBUTTONUP,1,1);
why I posted the code in c++ and not in vb6 becuz I dont want to make life easy to vb6 newbie








