Audacity start position under Windows XP

This section is now closed.

Audacity 1.2.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.

Audacity start position under Windows XP

Permanent link to this post Posted by wh_hsn » Fri Aug 31, 2007 9:33 am

Hi all,
(I've tried to send this to the audacity-devel but it doesn't appear - maybe I don't understand how it works :) )

I'm new here & I'd like to thank all the members for the great effort they are doing.

I found a minor bug in Audacity under WindowsXP, if the user chganged the default location of the task bar the main Audacit window got covered by the taskbar (if Task bar is always visible & docked on the top or left edge of the screen)

To fix this I added the following code to Project.cpp GetDefaultWindowRect()

Code: Select all
// BG: The default size and position of the first window
void GetDefaultWindowRect(wxRect *defRect)
   //the point that a new window should open at.
   defRect->x = 10;
   defRect->y = 10;
    defRect->width = 600;
   defRect->height = 400;
   //These conditional values assist in improving placement and size
   //of new windows on different platforms.
#ifdef __WXMAC__
   defRect->y += 50;

#ifdef __WXGTK__
   defRect->height += 20;
#ifdef __WXMSW__
   defRect->height += 40;     //WH: this was originaly there - I've no idea what is it for?!
   //WH: taking care of TaskBar position and size
      #include "shellapi.h"
      APPBARDATA abd;

    // Specify the structure size and handle to the appbar.
    abd.cbSize = sizeof(APPBARDATA);
    abd.hWnd = FindWindow(NULL, "Shell_TrayWnd");
      SHAppBarMessage(ABM_GETTASKBARPOS, &abd);

      {// we are only concerned if the bar is on the top or to the left edges
      case ABE_LEFT     :
            defRect->x += abd.rc.right;
      case ABE_TOP      :
            defRect->y += abd.rc.bottom;

Thanks you all,

Posts: 2
Joined: Fri Aug 31, 2007 9:18 am
Operating System: Please select

Return to Windows

Who is online

Users browsing this forum: No registered users and 9 guests