SHFullScreen too often returns "true" - How to check state of taskbar etc.

SHFullScreen(m_hWnd, SHFS_SHOWTASKBAR | SHFS_SHOWSIPBUTTON);

To my mind, this call should return FALSE on a pocketphone because the SIP button isn't supported, right However, it returns TRUE. What's the proper way to check to see if there is actually a taskbar, sip button, start button, etc. currently displayed on screen Also, it would be nice to have a call that returns the actual height of the taskbar in case that ever changes (or will it never change ).

I suppose we can rely on the following:

  • a windows CE application always launches with the taskbar displayed at the top of the screen
  • a windows CE taskbar is always 26 pixels
  • the location of an application frame window always starts at (0, 26)

The third assertion has turned out not to be true for me, apparently my window was at (0,27) so the example code from http://support.microsoft.com/kb/q266244/ doesn't work - it seems to make some erroneous assumptions itself. However discounting the third assumption I am still relying on the first two.

Will these assumptions be true for other devices for example a Zune




Answer this question

SHFullScreen too often returns "true" - How to check state of taskbar etc.

  • Faraz_Ahmed

    Ok after some more thinking and experimenting:

    • CE application may not always start with a taskbar displayed, and it may be at the top or bottom of the screen
    • CE taskbar varies in size depending on the screen resolution
      • the way to check for this is see what the position of your window is when the app starts
    • CE application may start at any of several (or more) position on the screen, check this position before doing anything
    • CE application usually has width of screen for window size, but it is more reliable to use GetDeviceCaps
    • Zune probably launches apps without taskbar


  • gabriel_333

    Another assumption I am making:

    • a windows CE application frame window always starts with the precise full width of the screen


  • SHFullScreen too often returns "true" - How to check state of taskbar etc.