jfbruno@rodan.acs.syr.edu (John Bruno) (09/20/90)
I believe I have found a minor error in the "Guide to Programming" book that
is supplied with SDK 3.0. It's in the StringOut function on page 18-6. This
function is supposed to write a string in the given font, then reset to the
previous font and return the length of the string. The function first
switches the font, then writes the text, then restores the original font,
then calculates and returns the length. The length should be calculated
before switching back to the original font, like so:
WORD StringOut(hDC, etc)
...
{
HANDLE hPrevFont;
WORD length;
hPrevFont = SelectObject(hDC, hFont);
TextOut(hDC, X, Y, lpString, lstrlen(lpString));
length=LOWORD(GetTextExtent(hDC, lpString, lstrlen(lpString)));
SelectObject(hDC, hPrevFont);
return(length);
}
Since I'm just learning about Win3, I'm wondering if anyone has noticed any
other problems with the SDK. If so, please post.
---jb
amull@Morgan.COM (Andrew P. Mullhaupt) (09/21/90)
In article <1990Sep19.190320.25693@rodan.acs.syr.edu>, jfbruno@rodan.acs.syr.edu (John Bruno) writes: > I believe I have found a minor error in the "Guide to Programming" book that > Since I'm just learning about Win3, I'm wondering if anyone has noticed any > other problems with the SDK. If so, please post. > Well since you asked: The example of how to make your own font in the Tools volume of the SDK doesn't work at all. There doesn't appear to be any way to create a functioning alternative font/character set. This is to my mind a tremendous shortcoming of a GUI, especially since it makes the whole thing unusable for me... Later, Andrew Mullhaupt
papa@pollux.usc.edu (Marco Papa) (09/22/90)
In article <1748@s6.Morgan.COM> amull@Morgan.COM (Andrew P. Mullhaupt) writes: >Well since you asked: The example of how to make your own font in the >Tools volume of the SDK doesn't work at all. There doesn't appear to >be any way to create a functioning alternative font/character set. >This is to my mind a tremendous shortcoming of a GUI, especially since >it makes the whole thing unusable for me... >Later, >Andrew Mullhaupt I really don't know what you're talking about. I've been creating fonts with no problems. Chapter 6 of the Tools SDK describes the FONT Editor, which allows you to either create a .FNT description file from scratch or edit a given .FNT font. I found it quite nice considering that one can run multiple copies of it, which can communicate through the clipboard. Quite handy to Cut a character description from one and Paste it into another. Of course this is not enough to create a .FON file, which is all described in detail on Chapter 18 -- Fonts of the Guide to Programming. -- Marco -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Xerox sues somebody for copying?" -- David Letterman -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
thj@mtcchi.uucp (XT0221000-Tom Hjellming(ZG90210)0000) (09/24/90)
>In article <1990Sep19.190320.25693@rodan.acs.syr.edu>, jfbruno@rodan.acs.syr.edu (John Bruno) writes: >> I believe I have found a minor error in the "Guide to Programming" book that >> Since I'm just learning about Win3, I'm wondering if anyone has noticed any >> other problems with the SDK. If so, please post. >> >Well since you asked: The example of how to make your own font in the >Tools volume of the SDK doesn't work at all. There doesn't appear to >be any way to create a functioning alternative font/character set. >This is to my mind a tremendous shortcoming of a GUI, especially since >it makes the whole thing unusable for me... >Later, >Andrew Mullhaupt I've been successful in creating my own fonts for 3.0. Can you describe your problem? The one 'gotcha' that I can think of is that it doesn't appear to support the 3.0 font format. I've traced through the AddFontResource() routine and can see where it is checking the version number. It checks for 1.0, 2.0, and then 3.0. If the format is 3.0, it immediately returns with an error. If you store you fonts in 2.0 format, then it works. I haven't investigated any further. (Seems real stupid for Windows 3.0 to not support 3.0 format fonts!!!) Can anyone else confirm or deny my observation? Tom Hjellming Analysts International Corp (AiC) Schaumburg, IL {Standard disclaimers apply} -- Tom Hjellming Software Consultant Analysts International Corp. (AiC) Schaumburg, IL