C++获取当前已登陆的QQ号
string getQQ() { HWND hWnd = GetDesktopWindow();//获取桌面句柄 HWND a = GetWindow(hWnd, GW_CHILD); char data[100]; string as = ""; string temp = ""; int i = 0; while (a) { GetWindowTextA(a, data, MAX_PATH); if (strstr(data, "QQ_")) { temp = data; temp = temp.substr(temp.find("_")+1, temp.rfind("_")-3); as += temp; as += "="; } a = GetWindow(a, GW_HWNDNEXT); } return as; }