FireMonkey Application with Multiple Monitors


I need to get the Screen Scale for the monitor my application is being displayed on. The multi-platform run-time TPlatFormServices has a service called IFMXScreenService that returns the Screen Scale (GetScreenScale).

The problem is it only returns it for the primary monitor. I need to get it for whichever monitor my application is being run on.

Below is my C++ code for getting the IFMXScreenService. How do I modify it to get the screen service for my active monitor?

if (TPlatformServices::Current->SupportsPlatformService(__uuidof(IFMXScreenService)) == true)
pScreenService_ = TPlatformServices::Current->GetPlatformService(__uuidof(IFMXScreenService));

Comments are closed.