Update FormView textbox from inside a thread 
Author Message
 Update FormView textbox from inside a thread

Hello,

When I change a document member variable from a worker thread in my CFormView
derived class and try to update the variable in a textbox (using UpdateData
(FALSE) I get an error.

It works fine outside the thread but will not work from inside the thread.
I am quite new to Visual C++ and any help on this will be greatly appreciated.

Thanks

Paul



Tue, 29 Jul 2003 22:04:50 GMT  
 Update FormView textbox from inside a thread

Quote:
>When I change a document member variable from a worker thread in my CFormView
>derived class and try to update the variable in a textbox (using UpdateData
>(FALSE) I get an error.

>It works fine outside the thread but will not work from inside the thread.
>I am quite new to Visual C++ and any help on this will be greatly appreciated.

Paul,

A multi-threaded UI is something I'd avoid like the plague. What you
could do is to have your worker thread post a user defined message to
the form view window and have the main UI thread do the update.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Wed, 30 Jul 2003 04:57:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Changing textbox.text for bound textbox doesn't update database

2. How to make some kind of small Help textbox in a formview

3. display an image inside a formview

4. Creating a formview derived class inside a DLL

5. Maximize Minimize inside Formview

6. Disabling menu items inside a formview

7. TextBox inside UserControl DataBinding with DataGrid outside UserControl

8. Access child TextBox inside a Repeater?

9. TextBox inside dataGrid tab error

10. Problem with thread inside thread

11. Getting thread id from inside the thread

12. problems with updating text to an Edit box in FormView

 

 
Powered by phpBB® Forum Software