Click here to Skip to main content
14,364,088 members

ATL / WTL / STL

 
GeneralRe: reasons Pin
bkelly137-Jul-14 15:03
memberbkelly137-Jul-14 15:03 
GeneralRe: reasons Pin
Richard MacCutchan7-Jul-14 23:04
protectorRichard MacCutchan7-Jul-14 23:04 
Questionfriend declaration causes undeclared identifier Pin
bkelly1330-Jun-14 6:55
memberbkelly1330-Jun-14 6:55 
AnswerRe: friend declaration causes undeclared identifier Pin
Subrat 470826612-Sep-14 16:20
memberSubrat 470826612-Sep-14 16:20 
Questiondestructor not being called (Resolved) Pin
bkelly1326-Jun-14 17:17
memberbkelly1326-Jun-14 17:17 
AnswerRe: destructor not being called Pin
Orjan Westin26-Jun-14 23:26
professionalOrjan Westin26-Jun-14 23:26 
GeneralRe: destructor not being called Pin
bkelly1327-Jun-14 14:06
memberbkelly1327-Jun-14 14:06 
Questionarray of static text controls Pin
bkelly1322-Jun-14 10:35
memberbkelly1322-Jun-14 10:35 
Windows 7, Visual Studio 2008, C++
I am creating a console type application that uses events and an MFC dialog app just to test it. The app uses WaitForMultipleObjects() with the attendant array of events. The dialog will show the count of events set and detected. The code to update the dialog and show those counts begins like this:
void CTest_ServerDlg::OnBnClickedBtnUpdateThreadEvents()
{
    const unsigned int NUMBER_SIZE = 8;
    WCHAR text_value[ NUMBER_SIZE ];
    int t;

    t = m_common_data.thread_event_detects[ 0 ];
    swprintf_s( text_value, NUMBER_SIZE, L"%03D", t );
    m_thread_event_00.SetWindowTextW( text_value );
}


m_thread_event_00 is the name of the control variable assigned to the static text control in the dialog. Presume there are 16 events. I am new to Dialogs and their controls so that means there will be 16 static text controls, each with its own named variable.
The Question:
Can this setup be arranged so that the values can be updated via an iteration rather than copying the last three lines 15 more times and changing the thread_event_detects[ 0 ] and m_thread_event_00 to increment up to 15?
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com


AnswerRe: array of static text controls Pin
Albert Holguin26-Jun-14 11:48
professionalAlbert Holguin26-Jun-14 11:48 
Questionneed help selecting a string type Pin
bkelly1313-Jun-14 5:27
memberbkelly1313-Jun-14 5:27 
AnswerRe: need help selecting a string type Pin
Richard MacCutchan13-Jun-14 8:13
protectorRichard MacCutchan13-Jun-14 8:13 
GeneralRe: need help selecting a string type Pin
bkelly1313-Jun-14 8:39
memberbkelly1313-Jun-14 8:39 
GeneralRe: need help selecting a string type Pin
Richard MacCutchan13-Jun-14 22:31
protectorRichard MacCutchan13-Jun-14 22:31 
GeneralRe: need help selecting a string type Pin
bkelly1314-Jun-14 10:47
memberbkelly1314-Jun-14 10:47 
GeneralRe: need help selecting a string type Pin
Richard MacCutchan14-Jun-14 11:05
protectorRichard MacCutchan14-Jun-14 11:05 
GeneralRe: need help selecting a string type Pin
bkelly1314-Jun-14 16:53
memberbkelly1314-Jun-14 16:53 
GeneralRe: need help selecting a string type Pin
Richard MacCutchan14-Jun-14 22:08
protectorRichard MacCutchan14-Jun-14 22:08 
Generalgoing heavy Pin
bkelly1316-Jun-14 14:49
memberbkelly1316-Jun-14 14:49 
GeneralRe: going heavy Pin
Richard MacCutchan16-Jun-14 22:24
protectorRichard MacCutchan16-Jun-14 22:24 
GeneralRe: need help selecting a string type Pin
Theo Buys6-Aug-15 6:31
memberTheo Buys6-Aug-15 6:31 
QuestionEnd a socket listen() operation Pin
bkelly133-Jun-14 9:26
memberbkelly133-Jun-14 9:26 
AnswerRe: End a socket listen() operation Pin
Albert Holguin5-Jun-14 10:41
professionalAlbert Holguin5-Jun-14 10:41 
GeneralRe: End a socket listen() operation Pin
bkelly1313-Jun-14 5:17
memberbkelly1313-Jun-14 5:17 
Questiondetect event in MFC dialog Pin
bkelly1331-May-14 12:51
memberbkelly1331-May-14 12:51 
AnswerRe: detect event in MFC dialog Pin
Richard MacCutchan31-May-14 22:00
protectorRichard MacCutchan31-May-14 22:00 

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.