|
-
Jun 25th, 2002, 11:45 AM
#1
Thread Starter
Hyperactive Member
Threads and Objects
what is the best way to access a ListCtrl from within a worker
thread?
I'm aware of the object over thread boundaries dilemma and
its possible catastrophic results.
Bababooey
Tatatoothy
Mamamonkey
-
Jun 25th, 2002, 01:54 PM
#2
Monday Morning Lunatic
Is this just a control in your window/dialogue, or do you mean an actual MFC wrapper object?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 25th, 2002, 07:48 PM
#3
Thread Starter
Hyperactive Member
it's in a window
i want a worker thread to manage parts of the list when i say to
instead of the app stalling everytime i make intensive changes
to the list.
what i did so far was passed the Thread function the hWnd of
my CListView and attached it to a window.
the problem is i created a pointer of type CWnd and used the
hWnd i passed from the View.....how do i access the ListCtrl
from the CWnd pointer now?
I'm not sure if i have to cast it, or create a CView pointer from
the hWnd i passed it....
Bababooey
Tatatoothy
Mamamonkey
-
Jun 25th, 2002, 08:02 PM
#4
Thread Starter
Hyperactive Member
i also tried to create a static member function within my CListView
derived class.... i obviously can not get at the listctrl from there
either
Bababooey
Tatatoothy
Mamamonkey
-
Jul 10th, 2002, 11:24 AM
#5
CListView view;
view.Attach(hwnd);
view.GetControl().Whatever();
I think it was GetControl(), but I'm not sure. This should work.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|