Solved

EMF - String EMF Structures data into one string

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Programming Codes 2 69
Is online banking safe? 11 126
Java array 10 87
Modify Text File with Excel Macro 13 50
A short article about a problem I had getting the GPS LocationListener working.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

751 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