| | |
Reading Listbox values of other window
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2009
Posts: 5
Reputation:
Solved Threads: 0
Hi,
Can anyone help me finding an application which can read listbox values of any other window on screen and save the list items either to clipboard or some text file, etc.
This may be done by getting the handle of the window/listbox and then reading the values, etc. I am novice in C programming.
Any help would be greatly appreciated.
Thanks.
Can anyone help me finding an application which can read listbox values of any other window on screen and save the list items either to clipboard or some text file, etc.
This may be done by getting the handle of the window/listbox and then reading the values, etc. I am novice in C programming.
Any help would be greatly appreciated.
Thanks.
•
•
Join Date: Mar 2008
Posts: 1,405
Reputation:
Solved Threads: 114
Assuming this is the defaut Windows API listbox..
Step 1: Find a handle to the window containing the list box. [link]
Step 2: Allocate enough space to hold the strings. eg.
Step 1: Find a handle to the window containing the list box. [link]
Step 2: Allocate enough space to hold the strings. eg.
Step 3: Retrieve those values. eg.C++ Syntax (Toggle Plain Text)
int count = (int) SendMessage( listbox, LB_GETCOUNT, 0, 0 ); std::string *items = new string[count];
I haven't tested this code, but it should work if you apply it right. Hope this helps.C++ Syntax (Toggle Plain Text)
for (int i = 0; i < count; ++i) { int itemLength = SendMessage( listbox, LB_GETTEXTLEN, i, 0 ); char *temp = new char[itemLength]; SendMessage( listbox, LB_GETTEXT, i, (LPARAM)&temp ); items[i] = temp; delete[] temp; }
I need pageviews! most fun profile ever :)
•
•
Join Date: Oct 2009
Posts: 5
Reputation:
Solved Threads: 0
thanks William, for your response.
Can you pls do me a favor to write a tiny app to read those values. With an interface like, specifying the window handle by some drag/drop thing and then read the list box values, etc.
I am very new to C++ programming and got this as a task :-s
Look forward to your response...
Can you pls do me a favor to write a tiny app to read those values. With an interface like, specifying the window handle by some drag/drop thing and then read the list box values, etc.
I am very new to C++ programming and got this as a task :-s
Look forward to your response...
•
•
Join Date: Mar 2008
Posts: 1,405
Reputation:
Solved Threads: 114
•
•
•
•
thanks William, for your response.
Can you pls do me a favor to write a tiny app to read those values. With an interface like, specifying the window handle by some drag/drop thing and then read the list box values, etc.
I am very new to C++ programming and got this as a task :-s
Look forward to your response...
If you're very new to programming, you shouldn't have been set a task like this. I wont do it for you, but what I will do is lead you in the right direction. Start by familiarizing yourself with basic C++, then follow this Win32 API tutorial [link]
There's plenty in there to get you started, after all, that's exactly how I learnt it.
Remember, we aren't here to write code for you.
I need pageviews! most fun profile ever :)
•
•
Join Date: Mar 2008
Posts: 1,405
Reputation:
Solved Threads: 114
What? Once again, not helping.
Also, I said
Also, I said
•
•
•
•
Assuming this is the defaut Windows API listbox.
Last edited by William Hemsworth; Oct 3rd, 2009 at 8:38 am.
I need pageviews! most fun profile ever :)
![]() |
Similar Threads
- reading values from script (JavaScript / DHTML / AJAX)
- Display values in listbox from db table regarding selected item in listbox? (PHP)
- asp:ListBox values not available when populated on client (ASP.NET)
- open pop up window and come back (JavaScript / DHTML / AJAX)
- saving selected listbox values in Cookies (C#)
- How can i add textbox values to listbox values.... (PHP)
- C++ Coding :: First Ever (C++)
Other Threads in the C++ Forum
- Previous Thread: .exe file works inside IDE but not inside folder
- Next Thread: Error: "subscripted value is neither array nor pointer"
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock wordfrequency wxwidgets






