writing a number in a wxTextCtrl control

Xu, Ming (NIH/NLM/NCBI) [F] mxu at ncbi.nlm.nih.gov
Tue May 1 15:52:14 PDT 2007


scanf("%d", &mask);
(*wxTextCtrlPtr) >> mask;

 

 printf("\nNumber of hosts: %d\n\n", nHosts);

(*wxTextCtrlPtr) << "\nNumber of hosts: " << nHosts << "\n\n";

 

 

________________________________

From: Franco Amato [mailto:eurofrank at gmail.com] 
Sent: Tuesday, May 01, 2007 6:26 PM
To: wxMailing-list
Subject: writing a number in a wxTextCtrl control

 

Hi people I would like to convert this piece of C standard code in wx

 

 int nHosts;

 scanf("%d", &mask);
 nHosts = (int)pow(2.0, (32 - mask)) - 2;
 printf("\nNumber of hosts: %d\n\n", nHosts);

 

where the scanf can be a wxTectctrl where a user write a number and the
printf another wxTextCtrl that put the result (a number)

 

Thanx very much

 

Frank
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20070501/9f79b90e/attachment.htm


More information about the wx-users mailing list