Click here to Skip to main content
16,007,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionopengl Pin
kayana16-Jun-07 16:13
kayana16-Jun-07 16:13 
AnswerRe: opengl Pin
leckey17-Jun-07 16:53
leckey17-Jun-07 16:53 
QuestionDerived Class and Base Class Pin
ForNow16-Jun-07 15:49
ForNow16-Jun-07 15:49 
AnswerRe: Derived Class and Base Class Pin
Cyrilix16-Jun-07 16:08
Cyrilix16-Jun-07 16:08 
GeneralRe: Derived Class and Base Class Pin
ForNow16-Jun-07 16:19
ForNow16-Jun-07 16:19 
AnswerRe: Derived Class and Base Class Pin
David Crow18-Jun-07 2:48
David Crow18-Jun-07 2:48 
GeneralRe: Derived Class and Base Class Pin
ForNow18-Jun-07 6:28
ForNow18-Jun-07 6:28 
QuestionSize of blank character in printf in MFC Pin
Electronic7516-Jun-07 11:03
Electronic7516-Jun-07 11:03 
Hello board, I want to print 10 columns in a list box so that it seems visually they are ordered in columns.
I use this code:
<br />
---       ------     ------     ------<br />
---       ------     ------     ------<br />
---       ------     ------     ------<br />
sInfo.Format(_T("%5d"), i);<br />
sInfo.AppendFormat(_T("%9.3f   ")), m_d1),<br />
sInfo.AppendFormat(_T("%9.3f   ")), m_d2),<br />
sInfo.AppendFormat(_T("%9.3f   ")), m_d3),<br />
sInfo.AppendFormat(_T("%9.3f   ")), m_d4),<br />
sInfo.AppendFormat(_T("%9.3f   ")), m_d5),<br />
sInfo.AppendFormat(_T("%9.3f   ")), m_d6),<br />
sInfo.AppendFormat(_T("%9.3f   ")), m_d7),<br />
sInfo.AppendFormat(_T("%9.3f   ")), m_d8),<br />
sInfo.AppendFormat(_T("%9.3f   ")), m_d9),<br />

Now , when I use this code deponding on number of significant digits in the double number, columns shift either to left or right(if number of digits are less than above row the whole row shifts to left and vice versa).
but when I use this code:
<br />
sInfo.Format(_T("%5d"), i);<br />
sInfo.AppendFormat(_T("%09.3f   ")), m_d1),<br />
sInfo.AppendFormat(_T("%09.3f   ")), m_d2),<br />
sInfo.AppendFormat(_T("%09.3f   ")), m_d3),<br />
sInfo.AppendFormat(_T("%09.3f   ")), m_d4),<br />
sInfo.AppendFormat(_T("%09.3f   ")), m_d5),<br />
sInfo.AppendFormat(_T("%09.3f   ")), m_d6),<br />
sInfo.AppendFormat(_T("%09.3f   ")), m_d7),<br />
sInfo.AppendFormat(_T("%09.3f   ")), m_d8),<br />
sInfo.AppendFormat(_T("%09.3f   ")), m_d9),<br />

everything becomes as I desire. I explain it in this way that size of blank characters that are placed in the first code is less than size of other digits. I actually do not like to see these zeros here(I wouldn't complain if these zeros were at right side of my bank account but not here Wink | ;) ).
Is there anyway that blank characters be printed with the same size of other digits? thanks.
AnswerRe: Size of blank character in printf in MFC Pin
Mark Salsbery16-Jun-07 11:34
Mark Salsbery16-Jun-07 11:34 
GeneralRe: Size of blank character in printf in MFC Pin
Electronic7516-Jun-07 17:59
Electronic7516-Jun-07 17:59 
QuestionRe: Size of blank character in printf in MFC Pin
David Crow18-Jun-07 2:43
David Crow18-Jun-07 2:43 
Questioncreating more than one window using GLUT Pin
moonraker92816-Jun-07 10:15
moonraker92816-Jun-07 10:15 
QuestionGetting Detailed NIC Info Pin
Akin Ocal16-Jun-07 9:36
Akin Ocal16-Jun-07 9:36 
AnswerRe: Getting Detailed NIC Info Pin
Mark Salsbery16-Jun-07 9:48
Mark Salsbery16-Jun-07 9:48 
GeneralRe: Getting Detailed NIC Info Pin
Akin Ocal16-Jun-07 9:49
Akin Ocal16-Jun-07 9:49 
GeneralRe: Getting Detailed NIC Info Pin
Mark Salsbery16-Jun-07 9:53
Mark Salsbery16-Jun-07 9:53 
GeneralRe: Getting Detailed NIC Info Pin
Akin Ocal16-Jun-07 10:11
Akin Ocal16-Jun-07 10:11 
GeneralRe: Getting Detailed NIC Info Pin
Mark Salsbery16-Jun-07 10:28
Mark Salsbery16-Jun-07 10:28 
QuestionEnumerating PCI & USB Devices ? Pin
Akin Ocal16-Jun-07 9:32
Akin Ocal16-Jun-07 9:32 
QuestionCArray - tripple array fails size assertion [modified] Pin
Vaclav_16-Jun-07 9:29
Vaclav_16-Jun-07 9:29 
AnswerRe: CArray - tripple array fails size assertion Pin
Mark Salsbery16-Jun-07 9:55
Mark Salsbery16-Jun-07 9:55 
QuestionProgress Control difference in Editor vs. Runtime Pin
StevenS_Dev16-Jun-07 6:35
StevenS_Dev16-Jun-07 6:35 
QuestionHow to communicate with soundcard Pin
Max++16-Jun-07 2:49
Max++16-Jun-07 2:49 
QuestionRe: How to communicate with soundcard Pin
Mark Salsbery16-Jun-07 6:01
Mark Salsbery16-Jun-07 6:01 
AnswerRe: How to communicate with soundcard Pin
Max++16-Jun-07 6:55
Max++16-Jun-07 6:55 

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.