How to Place TCanvas with Multiple Monitors?

I can place a TCanvas using the ->SetWindowPosition method, or in the constructor. With multiple monitors set up, it seems (0,0) is the top-left of the toppest-leftest monitor. I would like to place the TCanvases in a specific monitor for viewing.

I guess I need to query the OS for where the monitor pixel boundaries are, but I couldn’t find the right method in TSystem or TROOT.

Any help would be appreciated.

I found this exchange which talks about gClient->GetDisplayWidth() and GetDisplayHeight():
and while this works, it doesn’t tell me the individual monitor resolutions.

Hi @jfcaron ,

I suggest we wait until our graphics expert, @couet, is back from vacation.

Unless @bellenot has any clue?

Hi Jean Francois,

The support for dual screens on Windows has been added recently and is not a full support of multiple screens with their own resolution, and there is no plan to support this on Windows…

Cheers, Bertrand.

Thanks. I am on Linux anyways. I ended up just hardcoding the pixel coordinates that correspond to my desired monitor, as this is unlikely to change often, and it’s just a convenience to not have to move the TCanvas windows with the mouse every time.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.