Hi, I'm [playing round with writing a program that can get information/stats from dc++. I can get the Hub Windows, PMs, File list windows easily by using FindWindow or EnumChildWindows Easily enough, however my problem is when it comes to CListCtrls (User Lists, and current uploads/downloads)
I find the HWND of the List and cast it using
CListCtrl *list = (CListCtrl*)CListCtrl::FromHandle(hWnd);
which works fine, I can get the size of the list correctly from it, however if I try to loop through and get each list item dc++ sometimes crashes. I'm guessing its because these lists are continously adding and removing items, so I may be asking for a item that no longer exists (although I am using the getNext() command). As I said it's dc++ that crashes and not my program, so I'm obviously asking it something wrong. Any ideas of what I could do instead to get the lists?.
External Prog to access dc++
Moderator: Moderators
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us