Solved

Format String For Printing MFC

Posted on 2007-11-15
2
517 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 500 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Article by: Nadia
Suppose you use Uber application as a rider and you request a ride to go from one place to another. Your driver just arrived at the parking lot of your place. The only thing you know about the ride is the license plate number. How do you find your U…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

724 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