Affichage dans une textbox
j'ai une question tres simple a poser, �tant donner le niveau du forum !
je veut afficher un chiffre (aussi un string) dans une textbox apres un click.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
void first_app()
{
char label[6];
//strcpy(label , "123456");
_ultoa(IDC_EDIT1,"philo",6);
}
void CFirst_mfcDlg::OnButton1()
{
// TODO: Add your control notification handler code here
first_app();
} |
le d�guger me retourne l'erreur suivante :
Code:
1 2
|
unhandled exception in first_mfc.exe (MSVCRTD.DLL):0x00000005: access violation |
SEE YA_
Philo
Ps : Je recherche des infos sur la classe Cstring !
convertion de double vers CString
Bonjour,
votre fac indique bien la conversion de CString vers double, mais je veux faire maintenant de double vers CString, ce qui n'est pas marqu� dans la fac, dans quel rubrique du MSDN je peut trouver la convertion ou bien une autre fac sur developpez.com.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
char *stopstring;
double x;
CString result;
int var_1;
CString txt_1;
GetDlgItem(IDC_EDIT1)->GetWindowText(txt_1);
CString string = txt_1;
//CString string="3.1415926This stopped it";
x = strtod( string, &stopstring );
x = x + 1000;
// ici pouvoir convertir x vers une CString pour affichage dans une textbox. |
See ya_
philo