Solved

Format String For Printing MFC

Posted on 2007-11-15
2
507 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
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
Comment Utility
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
Comment Utility
That looks suspiciously like the format of a Visual Studio memory window :)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

One of Google's most recent algorithm changes affecting local searches is entitled "The Pigeon Update." This update has dramatically enhanced search inquires for the keyword "Yelp." Google searches with the word "Yelp" included will now yield Yelp a…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now