Mail Archives: cygwin/1996/11/13/17:34:46
Hi Jacob,
Good suggestion; I will put it on my todo list for the windows32api library.
Scott
At 06:17 PM 11/12/96 +0100, root wrote:
>The policy in the header files concerning UNICODE is that both functions
>(the W and A last letters) are defined. Both CreateWindowW and CreateWindowW
>are available.
>
>It is not the same for structures though. Consider this structure as is now
>defined in the gnu windows headers:
>typedef struct tagLOGFONT {
> LONG lfHeight;
> LONG lfWidth;
> LONG lfEscapement;
> LONG lfOrientation;
> LONG lfWeight;
> BYTE lfItalic;
> BYTE lfUnderline;
> BYTE lfStrikeOut;
> BYTE lfCharSet;
> BYTE lfOutPrecision;
> BYTE lfClipPrecision;
> BYTE lfQuality;
> BYTE lfPitchAndFamily;
> TCHAR lfFaceName[LF_FACESIZE]; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
>} LOGFONT,*LPLOGFONT;
>The TCHAR type is defined as WCHAR if UNICODE is active, or to CHAR if we are
>in ascii. This means that if I work in ascii, but want (for whatever reason)
>use the wide types, it is impossible.
>
>The solution to this riddle is simple: we have to define BOTH structures, even
>if the user has NOT defined UNICODE becuase he MAY want to use the wide
>structures too.
>
>Since this would lead to an increased size in the already voluminous headers,
>I propose to split the structures definitions in TWO files: one for the
>ASCII structures, and the other for the UNICODE structures when applicable.
>If the user wants to use the wide structures when NOT in UNICODE, he just
>would include the other file: #include <unicodestructs.h>. In the same vein
>if in UNICODE and wants to use the ASCII structure (passing arguments to
>16 bit programs, whatever) he would #include <asciistructures.h>.
>
>In any case, according to the UNICODE value, only one set of structures would
>be used by default, so 99.99% of you that do not have this kind of weird
>problems wouldn't be penalized...
>
>
>--
>Jacob Navia Logiciels/Informatique
>41 rue Maurice Ravel Tel 01 48.23.51.44
>93430 Villetaneuse Fax 01 48.23.95.39
>France
>-
>For help on using this list, send a message to
>"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
>
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -