Click here to Skip to main content
15,921,577 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: testing for <esc> key Pin
Christian Graus27-Apr-04 12:18
protectorChristian Graus27-Apr-04 12:18 
GeneralRe: testing for <esc> key Pin
jmkhael28-Apr-04 0:27
jmkhael28-Apr-04 0:27 
GeneralRe: testing for <esc> key Pin
Anonymous28-Apr-04 3:25
Anonymous28-Apr-04 3:25 
GeneralMSDN 2003, to Visual C++ 6 Pin
Dassatar27-Apr-04 11:21
Dassatar27-Apr-04 11:21 
GeneralRe: MSDN 2003, to Visual C++ 6 Pin
Garth J Lancaster27-Apr-04 11:38
professionalGarth J Lancaster27-Apr-04 11:38 
GeneralRe: MSDN 2003, to Visual C++ 6 Pin
Roger Wright27-Apr-04 12:49
professionalRoger Wright27-Apr-04 12:49 
GeneralRe: MSDN 2003, to Visual C++ 6 Pin
Prakash Nadar27-Apr-04 18:23
Prakash Nadar27-Apr-04 18:23 
QuestionSetDlgItemText from different thread ? Pin
rmnowick27-Apr-04 11:01
rmnowick27-Apr-04 11:01 
Hello,
I have a dialog box that contains a static text field. The field is just empty and serves as a box that I want to write a number into later. When I use SetDlgItemText I can set the value of the static text field. If I try to call SetDlgItemText from a different thread then I can't seem to get it to work. Anyone ever encounter this problem?

The thread I'm trying to call SetDlgItemText from was created by the thread that the dialog box is part of, so I guess it would be a child thread trying to update a static text box in the parents thread. Here is what the code looks like:

sprintf(static_message,"%8.3f",measured_value_float);<br />
if (chan_num_int == 101)<br />
{<br />
    strcpy(static_message_101,static_message);<br />
    //SetDlgItemText(hdlg,IDC_STATIC_1,static_message);<br />
}<br />
if (chan_num_int == 106)<br />
{<br />
    strcpy(static_message_106,static_message);<br />
    //SetDlgItemText(hdlg,IDC_STATIC_2,static_message);<br />
}<br />


Right now I'm just moving the values into the variables that start with static_message_10N. The dialog then checks these global variables every second and calls SetDlgItemText itself. I would think that it would be much cleaner if I could just have the other thread do it.

Thanks,
Robert
AnswerRe: SetDlgItemText from different thread ? Pin
rmnowick27-Apr-04 11:56
rmnowick27-Apr-04 11:56 
GeneralRe: SetDlgItemText from different thread ? Pin
rmnowick27-Apr-04 12:42
rmnowick27-Apr-04 12:42 
QuestionHow to get Table Names while using ADO Pin
Chauhan Chirag27-Apr-04 10:30
Chauhan Chirag27-Apr-04 10:30 
AnswerRe: How to get Table Names while using ADO Pin
John M. Drescher27-Apr-04 10:49
John M. Drescher27-Apr-04 10:49 
GeneralRe: How to get Table Names while using ADO Pin
Chauhan Chirag27-Apr-04 10:57
Chauhan Chirag27-Apr-04 10:57 
GeneralRe: How to get Table Names while using ADO Pin
John M. Drescher27-Apr-04 16:36
John M. Drescher27-Apr-04 16:36 
GeneralAccessing public variables Pin
Krugger40427-Apr-04 10:25
Krugger40427-Apr-04 10:25 
GeneralRe: Accessing public variables Pin
Joaquín M López Muñoz27-Apr-04 10:46
Joaquín M López Muñoz27-Apr-04 10:46 
GeneralRe: Accessing public variables Pin
Ravi Bhavnani27-Apr-04 11:14
professionalRavi Bhavnani27-Apr-04 11:14 
GeneralWindows Style Pin
Anthony988727-Apr-04 8:30
Anthony988727-Apr-04 8:30 
GeneralRe: Windows Style Pin
David Crow27-Apr-04 8:55
David Crow27-Apr-04 8:55 
Generalchar* shows up as sbyte* Pin
schoolGirl27-Apr-04 8:27
schoolGirl27-Apr-04 8:27 
GeneralRe: char* shows up as sbyte* Pin
Antti Keskinen27-Apr-04 11:04
Antti Keskinen27-Apr-04 11:04 
QuestionCTabCtrl with CFormView? Pin
emanuelllle1227-Apr-04 7:21
emanuelllle1227-Apr-04 7:21 
AnswerRe: CTabCtrl with CFormView? Pin
toxcct27-Apr-04 8:45
toxcct27-Apr-04 8:45 
QuestionMenu with Icons? Pin
blue-marie27-Apr-04 7:03
blue-marie27-Apr-04 7:03 
AnswerRe: Menu with Icons? Pin
toxcct27-Apr-04 7:12
toxcct27-Apr-04 7:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.