Is Fullscreen?

Back to topics list To post a new topic, please log in or register
avatar
4
Faltensack 2015.12.11 14:09
 

Hello together,

when I press F11 I get a FullScreen of my Chart and if I press F11 the Chart gets small again. Is it possible to see in mql4 whether I have Fullscreen or not.

Regards

Falte

avatar
13009
WHRoeder 2015.12.11 15:57 #
 
Fullscreen = no tool bars
avatar
4
Faltensack 2015.12.11 17:22 #
 
WHRoeder:
Fullscreen = no tool bars

Dear WHRoeder,


what do you mean with that comment? I try to find out in my mql4-Indicator if the chart window is Fullscreen or not (or in your words: is no tool bars or is tool bars). Is there an easy possibility to get this?

Regards

Klaus


avatar
13009
WHRoeder 2015.12.12 13:51 #
 
Faltensack: Is it possible to see in mql4 whether I have Fullscreen or not.
I answered your question on how you see. Indicator can't see and shouldn't need to know.
avatar
145
aakcaagac 2015.12.12 15:05 #
 

Actually there is a workaround or trick howto figure full screen (or full screen chart) if you wish.

I have this coming out of my mind:

  1. Use some Windows API to determine the Root Screen width and height. E.g. 1366 x 786
  2. Get the current Chart Window width and height size. E.g. 800 x 640
  3. Now 1366 != 800 and 786 != 640. Means the Windows API returned a higher screen resolution than what your Chart Window returns
  4. Knowing this, this tells you that your Chart Window IS NOT full screen
  5. Now if you press F11 (or the full screen menu option) then your Chart Window usually reaches close to 1366 x 768 in width and height
  6. So even if your Chart Window goes to 1350 x 755 then it's close to 1366 x 768 (you can add a threshold because the borders of your window decoration (or theme) needs to be subtracted). This can be used as some sort of IS FULL screen

In pseudo code, this would look like this:

int screenWidth = WindowsAPIGetScreenWidth();
int screenHeight = WindowsAPIGetScreenHeight();
int chartWidth = MQ4APIGetChartWidth();
int chartHeight = MQ4APIGetChartHeight();

boolean isFullScreen(int screenWidth, int screenHeight, int chartWidth, int chartHeight) {
  // threshold for width
  if ((chartWidth + 50) >= screenWidth) {
    chartWidth = screenWdith;
  }

  // threshold for height
  if ((chartHeight + 50) >= screenHeight) {
    chartHeight = screenHeight;
  }

  // do we believe it's full screen ? return true !
  if (screenWidth >= chartWidth && screenHeight >= chartHeight) {
    return true;
  }

  // do we believe it's NOT full screen ? return false !
  return false;
}

 

avatar
4
Faltensack 2015.12.29 11:45 #
 
aakcaagac:

Actually there is a workaround or trick howto figure full screen (or full screen chart) if you wish.

I have this coming out of my mind:

  1. Use some Windows API to determine the Root Screen width and height. E.g. 1366 x 786
  2. Get the current Chart Window width and height size. E.g. 800 x 640
  3. Now 1366 != 800 and 786 != 640. Means the Windows API returned a higher screen resolution than what your Chart Window returns
  4. Knowing this, this tells you that your Chart Window IS NOT full screen
  5. Now if you press F11 (or the full screen menu option) then your Chart Window usually reaches close to 1366 x 768 in width and height
  6. So even if your Chart Window goes to 1350 x 755 then it's close to 1366 x 768 (you can add a threshold because the borders of your window decoration (or theme) needs to be subtracted). This can be used as some sort of IS FULL screen

In pseudo code, this would look like this:

 

Thank you for your help Akcaagac. That was exactly what I was looking for!


Back to topics list  

To add comments, please log in or register