Solved

EMF - String EMF Structures data into one string

Posted on 2008-10-24
1
291 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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This is an explanation of a simple data model to help parse a JSON feed
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 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

17 Experts available now in Live!

Get 1:1 Help Now