Hi to all!

I'm trying to write a function to know actual screen orientation on
pocketpc.

I saw on MSDN that i can fetch related info with this code:

DEVMODE devmode = {0};
devmode.dmSize = sizeof(DEVMODE);
devmode.dmFields = DM_DISPLAYORIENTATION;
ChangeDisplaySettingsEx(NULL, &devmode, 0, CDS_TEST, NULL);

That's run fine if i compile the code with EVC++4 + ppc2003sdk for
pocketpc with windows mobile 2003 or later; but what about ppc2002?

There's a way to keep same executable, compiled with evc++3, that can
tell me screen orientation on ppc2002,2003/2003se/2005 and so on?

I know that there isn't screen orientation on ppc2002, but this
function in that case could give me "n/a" or "normal orientation" or
similar...

To be short:
- I should use ChangeDisplaySettingsEx in order to get screen
orientation
- ChangeDisplaySettingsEx is not available unless i use evc++4 with
ppc2003 sdk
- If i compile it with evc++4 it won't run on ppc2002

Do you think could be a solution for this? (without using 2
executables!)
:)

Thanks in advance for your patience!

Daniele.

Re: ChangeDisplaySettingsEx / PocketPC 2002 and 2003 by ctacke/>

ctacke/>
Thu Oct 19 17:04:25 CDT 2006

Dynamically load the function (GetProcAddress) and if it's not available,
then don't call it (meaning you're likely on PPC02).


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--




"Daniele M." <evilmaio@gmail.com> wrote in message
news:1161294503.637271.75520@f16g2000cwb.googlegroups.com...
> Hi to all!
>
> I'm trying to write a function to know actual screen orientation on
> pocketpc.
>
> I saw on MSDN that i can fetch related info with this code:
>
> DEVMODE devmode = {0};
> devmode.dmSize = sizeof(DEVMODE);
> devmode.dmFields = DM_DISPLAYORIENTATION;
> ChangeDisplaySettingsEx(NULL, &devmode, 0, CDS_TEST, NULL);
>
> That's run fine if i compile the code with EVC++4 + ppc2003sdk for
> pocketpc with windows mobile 2003 or later; but what about ppc2002?
>
> There's a way to keep same executable, compiled with evc++3, that can
> tell me screen orientation on ppc2002,2003/2003se/2005 and so on?
>
> I know that there isn't screen orientation on ppc2002, but this
> function in that case could give me "n/a" or "normal orientation" or
> similar...
>
> To be short:
> - I should use ChangeDisplaySettingsEx in order to get screen
> orientation
> - ChangeDisplaySettingsEx is not available unless i use evc++4 with
> ppc2003 sdk
> - If i compile it with evc++4 it won't run on ppc2002
>
> Do you think could be a solution for this? (without using 2
> executables!)
> :)
>
> Thanks in advance for your patience!
>
> Daniele.
>