none
Display rotation query by ChangeDisplaySettingsEx()? RRS feed

  • Question

  • Hello Experts,

    I rotate the display by 90 degrees by setting "Angle" to 1 in dss.reg and it is fine.  However, I have an external touch monitor that could not detect this rotation.  To look into this issue, I ran the Xaml application "Bounce.xaml" and found out that XamlPerf.exe in BSP ARM_A8_01_01 also could not detect the rotation - the function call "ChangeDisplaySettingsEx(NULL, &DevMode, NULL, CDS_TEST, NULL)" in the file main.c of XAMLPERF always return DMDO_0 even though my display is rotated by 90 degrees.

    Can you tell if it is a WinCE or BSP problem?  I appreciate your help.

    Luan


    Luan Le
    Wednesday, October 19, 2011 9:02 PM

All replies

  • Try this:

    DEVMODE DevMode;
    int iRotationAngles;
    
    memset (&DevMode, 0, sizeof (DevMode));
    DevMode.dmSize   = sizeof (DevMode);
    DevMode.dmFields = DM_DISPLAYQUERYORIENTATION;
    
    if (DISP_CHANGE_SUCCESSFUL == ChangeDisplaySettingsEx(NULL, &DevMode, NULL, CDS_TEST, NULL))
    {
    	iRotationAngles = DevMode.dmDisplayOrientation;
    	RETAILMSG(ROTATION_MSG, (L"ChangeDisplaySettingsEx supports these rotation angles %d\r\n", iRotationAngles));
    }
    

    If ChangeDisplaySettingsEx fails or has unexpected behaviour, check how the display driver DrvEscape function handles DRVESC_GETSCREENROTATION and DRVESC_SETSCREENROTATION


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Thursday, October 20, 2011 6:27 AM