-
July 9th, 2018, 01:42 AM
#1
edit box problem
how do i read the contents of the edit box when the thread is getting executed.i am not able to use the member variable of the edit box which i have created,its popping an error. plz help
-
July 9th, 2018, 02:32 AM
#2
Re: edit box problem
1. Why do you think you need to "read the contents of the edit box when the thread is getting executed"? How often do you need to do it?
2. I already gave you a link to a very useful essay about using worker threads here. Have you read it (the essay)?
Victor Nijegorodov
-
July 9th, 2018, 03:30 AM
#3
Re: edit box problem
Originally Posted by VictorN
1. Why do you think you need to "read the contents of the edit box when the thread is getting executed"? How often do you need to do it?
2. I already gave you a link to a very useful essay about using worker threads here. Have you read it (the essay)?
i need to read the edit box contents for every button press on the gui..hw do i read the contents without using the edit box member variable.plz help
-
July 9th, 2018, 04:37 AM
#4
Re: edit box problem
Windows is a message-oriented operating system, so you don't need a separate thread for doing that. Whenever a button is pressed, a message will be sent that you can handle. Preferably with message maps if you're using MFC.
https://msdn.microsoft.com/en-us/library/6d1asasd.aspx
-
July 9th, 2018, 06:22 AM
#5
Re: edit box problem
Originally Posted by Ramdhyani
i need to read the edit box contents for every button press on the gui..hw do i read the contents without using the edit box member variable.plz help
Indeed you can read the content using the edit box member variable. But you have to do it in your main GUI, not from within a worker one!
Victor Nijegorodov
-
July 26th, 2018, 01:33 PM
#6
Re: edit box problem
As said in one of your other threads, do not access the UI from worker threads, only from the main thread.
Tags for this Thread
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
|