Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

EMF - String EMF Structures data into one string

Posted on 2008-10-24
1
Medium Priority
?
315 Views
Last Modified: 2012-08-14
I am building a Report Print Preview Facility.
It will allow for programmatically inserting text, shapes, images, etc., into a report.
In addition it allows for EXPORTING the report to PDF and/or RTF.
I have built all this, and it happens just about fine.

My problem is with RTF output. Specifically with ROTATED Text.
To specify the text in a RTF file, I am going to construct the info into EMF string,
and place that info into the RTF file.
This WILL work.

I need to know the various "Type" definitions for the EMF Structures I will need
ONLY for the Rotated Text. I don't need them for anything else.
I can get the "C" definitions from Microsoft, but not the VB ones.

Where can I get these "type" definitions from ?

And, once I construct these structures, I need to string them all together into one long character string.
(The EMFHeader, any EMFData structures, end EMFEnd)

How can I string these all together ?

I also notice that (I think) the data in the string which originally had numbers (1,3,53, etc.) seems to be stored in lo-high order in the text string.
In other words, a simple number of 9, seems to be stored as 0900.
I think this is "little-Endian".

How do I make this happen?


0
Comment
Question by:Antithesus
1 Comment
 

Accepted Solution

by:
Antithesus earned 0 total points
ID: 22809752
Well, after MUCH more research, and searching, and "Googleing",
I have pretty much figured it all out.

For EMF, there is 1 or 2 "header" structures, depending on how you fill it in,
and then there is only 1 DATA structure.
The DATA structure can be considerably different, depending on the "function" call it is for.

I dug around quite a bit, and spent the last 2 days examining and dissecting the hex file records I have,
and I was finally able to figure out just what the records (functions) are that I need,
and how to complete the DATA structure for all of them.

I have obtained all the EMF function codes, and have obtained a majority of the Enumerated values used in some of them.

I also now can write a routine to ensure that all my numeric values are in hex format,
padded with sufficient zeros to always ensure the length is divisible by 2.

I will create logic to transpose the necessary hex components strings into "little endian" strings.

And I can create logic to aggregate the necessary results all into the necessary strings to be able to write them all out into my EMF record.

So, I guess I don't really need any help from you guys.

Thanks anyway... I'll refund my points on this one too.

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Introduction to Processes

926 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