Click here to Skip to main content
15,884,176 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 7:07
bkelly134-Jul-14 7:07 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 7:21
mveRichard MacCutchan4-Jul-14 7:21 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 8:20
bkelly134-Jul-14 8:20 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 20:10
mveRichard MacCutchan4-Jul-14 20:10 
Generalreasons Pin
bkelly135-Jul-14 7:22
bkelly135-Jul-14 7:22 
GeneralRe: reasons Pin
Richard MacCutchan6-Jul-14 4:44
mveRichard MacCutchan6-Jul-14 4:44 
GeneralRe: reasons Pin
bkelly137-Jul-14 14:03
bkelly137-Jul-14 14:03 
GeneralRe: reasons Pin
Richard MacCutchan7-Jul-14 22:04
mveRichard MacCutchan7-Jul-14 22:04 
Questionfriend declaration causes undeclared identifier Pin
bkelly1330-Jun-14 5:55
bkelly1330-Jun-14 5:55 
AnswerRe: friend declaration causes undeclared identifier Pin
Subrat 470826612-Sep-14 15:20
Subrat 470826612-Sep-14 15:20 
Questiondestructor not being called (Resolved) Pin
bkelly1326-Jun-14 16:17
bkelly1326-Jun-14 16:17 
AnswerRe: destructor not being called Pin
Orjan Westin26-Jun-14 22:26
professionalOrjan Westin26-Jun-14 22:26 
GeneralRe: destructor not being called Pin
bkelly1327-Jun-14 13:06
bkelly1327-Jun-14 13:06 
Questionarray of static text controls Pin
bkelly1322-Jun-14 9:35
bkelly1322-Jun-14 9: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:
C#
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 10:48
professionalAlbert Holguin26-Jun-14 10:48 
Questionneed help selecting a string type Pin
bkelly1313-Jun-14 4:27
bkelly1313-Jun-14 4:27 
AnswerRe: need help selecting a string type Pin
Richard MacCutchan13-Jun-14 7:13
mveRichard MacCutchan13-Jun-14 7:13 
GeneralRe: need help selecting a string type Pin
bkelly1313-Jun-14 7:39
bkelly1313-Jun-14 7:39 
GeneralRe: need help selecting a string type Pin
Richard MacCutchan13-Jun-14 21:31
mveRichard MacCutchan13-Jun-14 21:31 
GeneralRe: need help selecting a string type Pin
bkelly1314-Jun-14 9:47
bkelly1314-Jun-14 9:47 
GeneralRe: need help selecting a string type Pin
Richard MacCutchan14-Jun-14 10:05
mveRichard MacCutchan14-Jun-14 10:05 
GeneralRe: need help selecting a string type Pin
bkelly1314-Jun-14 15:53
bkelly1314-Jun-14 15:53 
GeneralRe: need help selecting a string type Pin
Richard MacCutchan14-Jun-14 21:08
mveRichard MacCutchan14-Jun-14 21:08 
Generalgoing heavy Pin
bkelly1316-Jun-14 13:49
bkelly1316-Jun-14 13:49 
GeneralRe: going heavy Pin
Richard MacCutchan16-Jun-14 21:24
mveRichard MacCutchan16-Jun-14 21:24 

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.