Solved

Format String For Printing MFC

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Detect file exist or not 3 176
White board coding practice 3 90
Which Linux flavors will this run on? 6 95
Gaming Software 1 17
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…
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 user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

792 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