On Thu, 2007-10-04 at 11:06 +0200, Jacek M. Holeczek wrote:
> When I try to compile the code, I get a message that the symbols related
> to screen orientation are not defined: DMDO_0, DMDO_90, DMDO_180,
> DMDO_270, DM_DISPLAYQUERYORIENTATION, DM_DISPLAYORIENTATION.

Indeed, we don't have all the macros we should have. Our include files
are inherited from other projects (e.g. MinGW). They're very good but
they tend to lack some CE specific stuff (CE is not their focus).

A patch for our include files would be very welcome :-)

> So, I am trying to define them myself:
> ---------------------------------------------------------------------
> enum DMD
>    {
>       DMDO_0      = 0,
>       DMDO_90     = 1,
>       DMDO_180    = 2,
>       DMDO_270    = 4
>    };
> 
> enum DM_Fields
>    {
>       DM_DISPLAYORIENTATION = 0x00800000L,
>       DM_DISPLAYQUERYORIENTATION =0x01000000L
>    };
> ---------------------------------------------------------------------
> Can anybody verify that it is correct? (I have also seen source code, in
> the Internet, in which people define, for example, DMDO_270=3, and/or
> DM_DISPLAYORIENTATION=0x00000080.)

The good sources for this information are (in this order) :
- reliable documentation such as MSDN
- programming examples

A bad source for such information is a copy of a Microsoft include file
- that's copyrighted.

> However, then the linker complains that the ChangeDisplaySettingsExW
> function is missing (I'm new to this whole business, so excuse my silly
> question - why, if I use ChangeDisplaySettingsEx in my source code, the
> linker complains about ChangeDisplaySettingsExW? What's this "W" in the
> function's name?)

Our winuser.h does contain the definition, but it appears to be masked
by #ifndef NOGDI .

For now you can try whether it helps to add -DNOGDI to your compile
command. This also needs to be fixed in the include files, again a patch
is welcome :-)

The mysterious A or W suffix is because Windows comes in many flavours.
Some have ASCII or Wide-character versions of the API. The include files
are meant to map a function name like ChangeDisplaySettingsEx into a
function that adds an A or W to the name, depending on whether the
UNICODE macro is defined.

For CE, UNICODE should always be defined. (CE only supports that part of
the API.)

        Danny

> Best regards,
> Thanks in advance,
> Jacek.
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to