Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 4.1

COLUMN

Printing Rotated Text, Part 2

Using declares to draw rotated text on Windows

Issue: 4.1 (September/October 2005)
Author: Christian Schmitz
Author Bio: Christian Schmitz is the creator of the Monkeybread Software REALbasic Plugins.
Article Description: No description available.
Article Length (in bytes): 10,313
Starting Page Number: 40
Article Number: 4119
Related Link(s): None

Excerpt of article text...

In this article we willdo the same thing we did last issue, but with unicode textencoding support -- allowing you to draw rotated text into any graphics object. This technique works fine both on-screen and in graphics sent to the printer.

On the Windows side we have to face the different Windows versions which all have different Unicode support. Mac OS X is nearly Unicode-only and Mac OS Classic uses the local text encoding like MacRoman for Western Europe.

So using only the Unicode version may make your application non-functional on Windows 95/98/ME as not all functions are available in Unicode versions there. Still, you may get some updated DLLs with Unicode functions if you install a newer Internet Explorer version.

If you want to avoid trouble with users which use older Windows versions, you can still include the ANSI declare. You need to use a soft declare to your unicode function. Soft declares are a new feature in REALbasic 2005 althrough they can be done using plugins already in REALbasic 3. The soft declare to the newer unicode function will fail if the function called is not available, so you can call the older function in that case.

Like this (corrected) example from the REALbasic 2005 Language Reference:

...End of Excerpt. Please purchase the magazine to read the full article.