[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Format String For Printing MFC

Posted on 2007-11-15
2
Medium Priority
?
525 Views
Last Modified: 2013-11-20
Hello,

I have a question that borrow me a few months now. I hope to find a solution here.

I have a string (String) that contains in all 3 Blocks. Means I have
Block1 like 00000000
Block2  Data like: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
block3  = thisisstringgggg
Every block is "spliited" by a space. So the complete string has:
"00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 thisisstringgggg"
The problem is now, that the string content is everyline different and contains differnt chars. So the String do not have the same pixeldimension each line.
How is it possible to format the string this way that if I print it to a printer or save to a text file will have the same dimension so it looks like one line and not like "zickzack".

00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 thisisstringgggg
00MMFF0F 00 MM FF 00 00 00 00 00 00 00 00 00 00 00 00 00 TTisisstringgggg
II0II000 00 00 00 00 00 00 II 00 00 00 00 00 00 00 00 00 iiisisstringgggg

Thanks,
Ingo
0
Comment
Question by:Ocrana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 20295959
the recommended way for these blocks that have to be aligned is to use a fixed-width font, like Courier New, so whichever is your printing method, use this kind of font.
0
 
LVL 40

Expert Comment

by:evilrix
ID: 20296813
That looks suspiciously like the format of a Visual Studio memory window :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question