Solved

EMF - String EMF Structures data into one string

Posted on 2008-10-24
1
297 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
A short article about problems I had with the new location API and permissions in Marshmallow
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 …
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 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