Solved

EMF - String EMF Structures data into one string

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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 …
Suggested Courses
Course of the Month9 days, 22 hours left to enroll

623 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