Hello,
I have a problem in my Windows App. I want a formated edition in a Edit Window. In ANSI C it is easy for example:
for ( int i = 0; i < 100; i++ )
printf ( "%d\n", i );
on screen appear: 1
2
3
and so on.
The same I want in a Edit Window in my Windows app, but it don't works, I try the following:
hwndTest = GetDlgItem ( hwnd, IDC_TEST );
for ( i = 0; i < 20; i++ )
{
_itoa ( i, temp, 10 );
strcpy ( buffer, temp );
strcat ( buffer, "\n" );
strcat ( buffer, temp );
SetWindowText ( hwndTest, buffer );
}
But "i" appear only one time (the last i also 19) Why ? What's not correct in my source ?
Have anyone a idea ?
Thanks SiM
[sig][/sig]
I have a problem in my Windows App. I want a formated edition in a Edit Window. In ANSI C it is easy for example:
for ( int i = 0; i < 100; i++ )
printf ( "%d\n", i );
on screen appear: 1
2
3
and so on.
The same I want in a Edit Window in my Windows app, but it don't works, I try the following:
hwndTest = GetDlgItem ( hwnd, IDC_TEST );
for ( i = 0; i < 20; i++ )
{
_itoa ( i, temp, 10 );
strcpy ( buffer, temp );
strcat ( buffer, "\n" );
strcat ( buffer, temp );
SetWindowText ( hwndTest, buffer );
}
But "i" appear only one time (the last i also 19) Why ? What's not correct in my source ?
Have anyone a idea ?
Thanks SiM
[sig][/sig]