Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » What is e_ui_scaling_type_t? Collapse All
Subject Author Date
Offer Har Jan 1, 2009 - 8:31 PM

I see this enum and functions:



    enum e_ui_scaling_type_t
    {
        __EUIST_X		   = 0,
        __EUIST_Y		   = 1,
        __EUIST_Z		   = 2,
        __EUIST_MIN_VALUE   = 0,
        __EUIST_MAX_VALUE   = 2,
    };
    virtual bool UiScalingIsEnabled(
        e_ui_scaling_type_t eUIST
        ) const;
    virtual INT UiScalingDo(
        INT nValue,
        e_ui_scaling_type_t eUIST
        ) const;

Used in the filter gird sample - what are they for? I could not find them in the help.


Thanks,


Ron.


 

Technical Support Jan 2, 2009 - 3:02 PM

If you have some CSize variable which contains the size of some control or its parts when screen DPI is set to 96 both horizontally and vertically and you want this CSize variable be proportionally increased on desktops with larger DPI settings, then you should use the following code:

CSize sizeAt96DPI( . . . , . . . );
CSize correctSizeInPixelsAtAnyDPI;
CExtPaintManager * pPM = g_PaintManager.GetPM();
            correctSizeInPixelsAtAnyDPI.cx = pPM->UiScalingDo( sizeAt96DPI.cx, CExtPaintManager::__EUIST_X );
            correctSizeInPixelsAtAnyDPI.cy = pPM->UiScalingDo( sizeAt96DPI.cy, CExtPaintManager::__EUIST_Y );

The APIs in your question is the UI scaling feature of paint manager component. This feature makes Prof-UIS components proportionally scaled on desktops with different DPI settings.