| View previous topic :: View next topic |
| Author |
Message |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri May 09, 2008 7:36 pm Post subject: List sharing |
|
|
Is there a way that 2 VDS apps can share a list? Kinda like Memorymap with variables except with a list.
I want any changes made to a list with one app to be reflected in another app and vice/versa seemingly in realtime.
Can this be done in VDS?
Thanks in advance. |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri May 09, 2008 8:04 pm Post subject: |
|
|
Just thought I would clarify.
One app will do nothing but add to the list.
The other app will process the contents of the list and then delete the items as they are processed.
This is the general concept anyway. |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri May 09, 2008 9:18 pm Post subject: |
|
|
Well apparently "Window Settext" doesn't work on lists  |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Sat May 10, 2008 4:19 pm Post subject: |
|
|
| You'll have to save the list to a file and load the file in each list box. I don't think sending them with windows messages/api is going to be as efficient since you have to send each item one by one. |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon May 12, 2008 2:26 pm Post subject: |
|
|
Actually PGWARE it may be faster to send the Messages since there will be no hard drive IO involved. It really depends on how big the list is. BTW don't use the VDS @sendmsg() function for this. I would use the PostMessage API instead since your second program is in it's on thread. This issue will be sending messages with pointers across process boundaries. If you wanted to give it a try it would be the LB_ADDSTRING = $0180 API Message to add a value to a list box. The LParam needs the address of a string that you want to add to the list box. I don't know if this message works with the VDS bitmap list element I would try the @sendmsg() but if that does not work then use the PostMessage API as I suggested above. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon May 12, 2008 8:06 pm Post subject: |
|
|
Thanks for the idea Dragonsphere
The list should always remain quit small, maybe 10 items max. I'll look into using the PostMessage API.
I guess I could use a hidden or zero sized listbox on the app that has a dialog and manipulate it from the one that doesn't have a dialog.
Now I need to find an efficient way let the app sending the messages know what the handle for the List element is. I may just use the registry for that part. |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon May 12, 2008 8:27 pm Post subject: |
|
|
You would know the title text of your application right? Get the handle to the application and then use the @window() VDS function to walk the child windows until you find your list box. Place the list box at the top of your dialog elements so it will be the first list box. That way you would not need to use the registry. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon May 12, 2008 8:55 pm Post subject: |
|
|
It Worked!!!
Have a box of virtual cookies on me Dragonsphere  |
|
| Back to top |
|
 |
|