Announcement

Collapse
No announcement yet.

Windows 95/98 Start Taskbar Height

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Windows 95/98 Start Taskbar Height

    Can any one point the way to getting the height of the Win 95/98 Start Taskbar.
    I have used the 'GetSystemMetrics' call but this piece of info is not amongst those returned.


    ------------------

  • #2
    I'm not at my DEV PC to give you any example code, but the technique is straight forward.

    The key to the solution is that the taskbar occupies the difference between the screen width/height and the work area width/height.

    Look up the SystemParametersInfo() API with the %SPI_GETWORKAREA, and get the screen size with GetSystemMetrics() with %SM_CXFULLSCREEN and again with %SM_CYFULLSCREEN. With the results of these three calls, you should be able to calculate the taskbar height.

    Remember that the task bar can be on *any* edge of the monitor. I'm not sure how these settings are affected by multiple-monitor setup's as I have never been successful in getting my PC to work with more than one PCI video card (tried PCI+PCI, PCI+AGP, etc, to no avail).

    I hope this helps.

    BTW, if you search the BBS for "SPI_GETWORKAREA" you should fine some example code I posted (some time ago) that shows how to center a window in the work area (rather than just centralized on the screen as the majority of programmers seem to do ).

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Lance,

      Thank you for your timely, as always, response.
      I did the search you suggested and now have a working solution.

      Regards

      Barney


      ------------------

      Comment

      Working...
      X