This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Resizeable main window


This adds the ability to resize the main window, with support for facilities to adjust the size/position of child elements.

Currently, it adds a thick border and maximize box to the main window, and dragging the border resizes the contained pages and adjusts some controls (in particular, the bottom right Back/Next/Etc buttons stay in the bottom right, and the top right Cygwin icon stays where it is.) Further work needs to be done to make everything "resize friendly", but it's a start.

The changes have been made against the CVS version and tested on WinXP. The code utilizes some "less public" aspects of property sheets and makes certain assumptions on it's internal workings, so it *may* break on other versions.

-f.r.


2003-10-16  Frank Richter  <frichter@gmx.li>

	* ControlAdjuster.cc: New file, helper to move elements of a dialog 
	along when the it's resized. 
	* ControlAdjuster.h: Ditto.
	* Makefile.am: Add new source files.
	* proppage.cc (PropertyPage::DialogProc): Adjust some common
	controls (Cygwin icon top right, separator below) when a page is
	resized.
	(PropertyPage::PropertyPage): Dito.
	* propsheet.cc (IsDialog): New. Test whether a window is a dialog.
	Used internally by resize logic.
	(EnumPages): New. Used internally by resize logic: resizes the
	property sheet's individual pages.
	(PropSheetWndProc): New. Hook for the propery sheet window proc.
	(PropSheetProc): More style tweaks, add maximize box and thick border
	as well. Hook into the property sheet's window proc.
	(PropSheet::AdjustPageSize): New. Adjust the metrics of a single page
	to fit nicely into the property sheet. Part of resize logic.
	* res.rc (All dialogs): The top-right Cygwin icon and top separator
	now have IDs distinct from IDC_STATIC, so their metrics can be 
	adjusted upon a resize. 

/*
 * Copyright (c) 2003, Frank Richter <frichter@gmx.li>
 *
 *     This program is free software; you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation; either version 2 of the License, or
 *     (at your option) any later version.
 *
 *     A copy of the GNU General Public License can be found at
 *     http://www.gnu.org/
 *
 * Written by Frank Richter.
 *
 */

#include "ControlAdjuster.h"
#include "RECTWrapper.h"
 
void ControlAdjuster::AdjustControls (HWND dlg, 
				      const ControlInfo controlInfo[],   
				      int widthChange, int heightChange)
{
  const ControlInfo* ci = controlInfo;
  
  while (ci->control > 0)
  {
    HWND ctl = GetDlgItem (dlg, ci->control);  
    if (ctl != 0)
    {
      RECTWrapper ctlRect;
      GetWindowRect (ctl, &ctlRect);
      // We want client coords.
      ScreenToClient (dlg, (LPPOINT)&ctlRect.left);
      ScreenToClient (dlg, (LPPOINT)&ctlRect.right);
      
      /*
        Now adjust the rectangle.
	If an anchor is set, the resp. edge is 'sticky' with respect to the
	opposite border.
       */
      if (!ci->anchorLeft) 
        ctlRect.left += widthChange;
      if (!ci->anchorTop) 
        ctlRect.top += heightChange;
      if (ci->anchorRight) 
        ctlRect.right += widthChange;
      if (ci->anchorBottom) 
        ctlRect.bottom += heightChange;
	
      SetWindowPos (ctl, 0, ctlRect.left, ctlRect.top, 
	ctlRect.width (), ctlRect.height (), SWP_NOACTIVATE | SWP_NOZORDER);
      // If not done, weird visual glitches can occur.
      InvalidateRect (ctl, 0, false);
      
    }
    ci++;
  }
}
 
SizeProcessor::SizeProcessor ()
{
  rectValid = false;
}
 
void SizeProcessor::AddControlInfo (
  const ControlAdjuster::ControlInfo* controlInfo)
{
  controlInfos.push_back (controlInfo);
}

void SizeProcessor::UpdateSize (HWND dlg)
{
  RECTWrapper clientRect;
  ::GetClientRect (dlg, &clientRect);

  if (rectValid)
    {
      const int dX = clientRect.width () - lastRect.width ();
      const int dY = clientRect.height () - lastRect.height ();
	
      for (size_t i = 0; i < controlInfos.size (); i++)
	ControlAdjuster::AdjustControls (dlg, controlInfos[i], dX, dY);
    }
  else
    rectValid = true;
    
  memcpy (&lastRect, &clientRect, sizeof (RECTWrapper));
}
/*
 * Copyright (c) 2003, Frank Richter <frichter@gmx.li>
 *
 *     This program is free software; you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation; either version 2 of the License, or
 *     (at your option) any later version.
 *
 *     A copy of the GNU General Public License can be found at
 *     http://www.gnu.org/
 *
 * Written by Frank Richter.
 *
 */

#ifndef SETUP_CONTROLADJUSTER_H
#define SETUP_CONTROLADJUSTER_H

#include <vector>

#include <windows.h>
#include "RECTWrapper.h"

/*
  This is a helper class to move/resize controls of a dialog when it's size
  is changed. It's no fancy layouting stuff, but rather just moving them
  around - to, for example, keep controls at the bottom really at the bottom
  when the size changes.
 */

class ControlAdjuster
{
public:
  struct ControlInfo
  {
    // Control ID
    int control;
    /*
      Anchors. Basically, says which edge should be "sticky".
     */
    bool anchorLeft;
    bool anchorTop;
    bool anchorRight;
    bool anchorBottom;
  };
  
  /*
    Adjust all the controls.
    'controlInfo' an array with the moving information.
    The terminating item of the array should have an ID <= 0.
   */
  static void AdjustControls (HWND dlg, const ControlInfo controlInfo[],
    int widthChange, int heightChange);
};

class SizeProcessor
{
  typedef std::vector<const ControlAdjuster::ControlInfo*> ControlInfos;
  ControlInfos controlInfos;
  bool rectValid;
  RECTWrapper lastRect;
public:
  SizeProcessor ();
  
  void AddControlInfo (const ControlAdjuster::ControlInfo* controlInfo);
  void UpdateSize (HWND dlg);
};

#endif // SETUP_CONTROLADJUSTER_H 
Index: Makefile.am
===================================================================
RCS file: /cvs/cygwin-apps/setup/Makefile.am,v
retrieving revision 2.34
diff -u -p -r2.34 Makefile.am
--- Makefile.am	30 Jul 2003 09:04:27 -0000	2.34
+++ Makefile.am	16 Oct 2003 16:32:49 -0000
@@ -140,6 +140,8 @@ setup_SOURCES = \
 	compress_gz.h \
 	ConnectionSetting.cc \
 	ConnectionSetting.h \
+	ControlAdjuster.cc \
+	ControlAdjuster.h \
 	cygpackage.cc \
 	cygpackage.h \
 	desktop.cc \
Index: proppage.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/proppage.cc,v
retrieving revision 2.9
diff -u -p -r2.9 proppage.cc
--- proppage.cc	2 Aug 2003 00:02:01 -0000	2.9
+++ proppage.cc	16 Oct 2003 16:32:49 -0000
@@ -26,12 +26,23 @@
 
 bool PropertyPage::DoOnceForSheet = true;
 
+/*
+  Sizing information for some controls that are common to all pages.
+ */
+static ControlAdjuster::ControlInfo DefaultControlsInfo[] = {
+  {IDC_HEADICON, 	false, true,  true,  false},
+  {IDC_HEADSEPARATOR, 	true,  true,  true,  false},
+  {0, false, false, false, false}
+};
+
 PropertyPage::PropertyPage ()
 {
   proc = NULL;
   cmdproc = NULL;
   IsFirst = false;
   IsLast = false;
+  
+  sizeProcessor.AddControlInfo (DefaultControlsInfo);
 }
 
 PropertyPage::~PropertyPage ()
@@ -117,6 +128,9 @@ PropertyPage::DialogProc (UINT message, 
 	OnInit ();
 
 	setTitleFont ();
+	
+	// Call it here so it stores the initial client rect.
+	sizeProcessor.UpdateSize (GetHWND ());
 
 	// TRUE = Set focus to default control (in wParam).
 	return TRUE;
@@ -140,6 +154,8 @@ PropertyPage::DialogProc (UINT message, 
 		DoOnceForSheet = false;
 	      }
 
+	    GetOwner ()->AdjustPageSize (GetHWND ());
+	      
 	    // Set the wizard buttons apropriately
 	    if (IsFirst)
 	      {
@@ -253,6 +269,11 @@ PropertyPage::DialogProc (UINT message, 
 	  {
 	    return HANDLE_WM_COMMAND (GetHWND (), wParam, lParam, cmdproc);
 	  }
+	break;
+      }
+    case WM_SIZE:
+      {
+	sizeProcessor.UpdateSize (GetHWND ());
 	break;
       }
     default:
Index: proppage.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/proppage.h,v
retrieving revision 2.9
diff -u -p -r2.9 proppage.h
--- proppage.h	6 Oct 2003 22:19:59 -0000	2.9
+++ proppage.h	16 Oct 2003 16:32:49 -0000
@@ -24,6 +24,7 @@
 #include <prsht.h>
 
 #include "window.h"
+#include "ControlAdjuster.h"
 
 class PropSheet;
 
@@ -39,7 +40,7 @@ class PropertyPage:public Window
 
   // For setting the back/finish buttons properly.
   bool IsFirst, IsLast;
-
+  
   static BOOL CALLBACK FirstDialogProcReflector (HWND hwnd, UINT message,
 						 WPARAM wParam,
 						 LPARAM lParam);
@@ -48,6 +49,8 @@ class PropertyPage:public Window
   void setTitleFont ();
 
 protected:
+    SizeProcessor sizeProcessor;
+  
     virtual BOOL CALLBACK DialogProc (UINT message, WPARAM wParam,
 				      LPARAM lParam);
 
Index: propsheet.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/propsheet.cc,v
retrieving revision 2.6
diff -u -p -r2.6 propsheet.cc
--- propsheet.cc	3 Aug 2003 16:25:18 -0000	2.6
+++ propsheet.cc	16 Oct 2003 16:32:49 -0000
@@ -21,6 +21,8 @@
 #include "propsheet.h"
 #include "proppage.h"
 #include "resource.h"
+#include "RECTWrapper.h"
+#include "ControlAdjuster.h"
 
 //#include <shlwapi.h>
 // ...but since there is no shlwapi.h in mingw yet:
@@ -99,6 +101,102 @@ PropSheet::CreatePages ()
   return retarray;
 }
 
+// Stuff needed by the PropSheet wndproc hook
+// @@@ Ugly. Really only works because only one PS is used now.
+static struct _PropSheetData
+{
+  WNDPROC oldWndProc;
+  bool clientRectValid;
+  RECTWrapper lastClientRect;
+  bool gotPage;
+  RECTWrapper pageRect;
+  
+  _PropSheetData ()
+  {
+    // Brutish... but does the trick.
+    memset (this, 0, sizeof (*this));
+  }
+} PropSheetData;
+
+static ControlAdjuster::ControlInfo PropSheetControlsInfo[] = {
+  {0x3023, false, false, true,  true },	// Back
+  {0x3024, false, false, true,  true },	// Next
+  {0x3025, false, false, true,  true },	// Finish
+  {0x3026, true,  false, true,  true },	// Line above buttons
+  {	2, false, false, true,  true },	// Cancel
+  {0, false, false, false, false}
+};
+
+static bool IsDialog (HWND hwnd)
+{
+  char className[7];
+  GetClassName (hwnd, className, sizeof (className));
+  
+  return (strcmp (className, "#32770") == 0);
+}
+
+BOOL CALLBACK EnumPages (HWND hwnd, LPARAM lParam)
+{
+  // Is it really a dialog?
+  if (IsDialog (hwnd))
+    {
+      SetWindowPos (hwnd, 0, PropSheetData.pageRect.left, 
+	PropSheetData.pageRect.top, PropSheetData.pageRect.width (), 
+	PropSheetData.pageRect.height (), SWP_NOACTIVATE | SWP_NOZORDER);
+    }
+
+  return TRUE;
+}
+
+static LRESULT CALLBACK PropSheetWndProc (HWND hwnd, UINT uMsg, 
+  WPARAM wParam, LPARAM lParam)
+{
+  switch (uMsg)
+    {
+    case WM_SIZE:
+      {
+        RECTWrapper clientRect;
+        GetClientRect (hwnd, &clientRect);
+	
+	/*
+	  The first time we get a WM_SIZE, the client rect will be all zeros.
+	 */
+	if (PropSheetData.clientRectValid)
+	  {
+	    const int dX =
+	      clientRect.width () - PropSheetData.lastClientRect.width ();
+	    const int dY =
+	      clientRect.height () - PropSheetData.lastClientRect.height ();
+	      
+	    ControlAdjuster::AdjustControls (hwnd, PropSheetControlsInfo, 
+	      dX, dY);
+	    
+	    PropSheetData.pageRect.right += dX;
+	    PropSheetData.pageRect.bottom += dY;
+	      
+	    /*
+	      The pages are child windows, but don't have IDs.
+	      So change them by enumerating all childs and adjust all dilogs
+	      among them.
+	     */
+	    if (PropSheetData.gotPage)
+	      EnumChildWindows (hwnd, &EnumPages, 0);	
+	  }
+	else
+	  {
+	    PropSheetData.clientRectValid = true;
+	  }
+	
+	memcpy (&PropSheetData.lastClientRect, &clientRect, 
+	  sizeof (RECTWrapper));
+      }
+      break;
+    }
+  
+  return CallWindowProc (PropSheetData.oldWndProc, 
+    hwnd, uMsg, wParam, lParam);
+}
+
 static int CALLBACK
 PropSheetProc (HWND hwndDlg, UINT uMsg, LPARAM lParam)
 {
@@ -106,17 +204,31 @@ PropSheetProc (HWND hwndDlg, UINT uMsg, 
     {
     case PSCB_PRECREATE:
       {
+	const LONG additionalStyle = 
+	  (WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME);
 	// Add a minimize box to the sheet/wizard.
 	if (((LPDLGTEMPLATEEX) lParam)->signature == 0xFFFF)
 	  {
-	    ((LPDLGTEMPLATEEX) lParam)->style |= WS_MINIMIZEBOX;
+	    ((LPDLGTEMPLATEEX) lParam)->style |= additionalStyle;
 	  }
 	else
 	  {
-	    ((LPDLGTEMPLATE) lParam)->style |= WS_MINIMIZEBOX;
+	    ((LPDLGTEMPLATE) lParam)->style |= additionalStyle;
 	  }
       }
       return TRUE;
+    case PSCB_INITIALIZED:
+      {
+        /*
+	  Hook into the window proc.
+	  We need to catch some messages for resizing.
+	 */
+        PropSheetData.oldWndProc = 
+	  (WNDPROC)GetWindowLongPtr (hwndDlg, GWLP_WNDPROC);
+	SetWindowLongPtr (hwndDlg, GWLP_WNDPROC, 
+	  (LONG_PTR)&PropSheetWndProc);
+      }
+      return TRUE;
     }
   return TRUE;
 }
@@ -218,6 +330,49 @@ PropSheet::SetHWNDFromPage (HWND h)
   // If we're a modal dialog, there's no way for us to know our window handle unless
   // one of our pages tells us through this function.
   SetHWND (h);
+}
+
+/*
+  Adjust the size of a page so that it fits nicely into the window.
+ */
+void
+PropSheet::AdjustPageSize (HWND page)
+{
+  if (!PropSheetData.clientRectValid) return;
+
+  /*
+    It's probably not obvious what's done here:
+    When this method is called the first time, the first page is already
+    created and sized, but at the coordinates (0,0). The sheet, however,
+    isn't in it's final size. My guess is that the sheet first creates the
+    page, and then resizes itself to have the right metrics to contain the 
+    page and moves it to it's position. For our purposes, however, we need
+    the final metrucs of the page. So, the first time this method is called,
+    we basically grab the size of the page, but calculate the top/left coords
+    ourselves.
+   */
+  
+  if (!PropSheetData.gotPage)
+    {
+      PropSheetData.gotPage = true;
+
+      RECTWrapper& pageRect = PropSheetData.pageRect;
+      ::GetWindowRect (page, &pageRect);
+      // We want client coords.
+      ::ScreenToClient (page, (LPPOINT)&pageRect.left);
+      ::ScreenToClient (page, (LPPOINT)&pageRect.right);
+
+      LONG dialogBaseUnits = ::GetDialogBaseUnits ();
+      // The margins in DUs are a result of "educated guesses" and T&E.
+      int marginX = MulDiv (5, LOWORD(dialogBaseUnits), 4);
+      int marginY = MulDiv (5, HIWORD(dialogBaseUnits), 8);
+
+      pageRect.move (marginX, marginY);
+    }
+
+  SetWindowPos (page, 0, PropSheetData.pageRect.left, 
+    PropSheetData.pageRect.top, PropSheetData.pageRect.width (), 
+    PropSheetData.pageRect.height (), SWP_NOACTIVATE | SWP_NOZORDER);
 }
 
 void
Index: propsheet.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/propsheet.h,v
retrieving revision 2.5
diff -u -p -r2.5 propsheet.h
--- propsheet.h	3 Aug 2003 16:25:18 -0000	2.5
+++ propsheet.h	16 Oct 2003 16:32:49 -0000
@@ -45,6 +45,7 @@ public:
 
   // Should be private and friended to PropertyPage
   void SetHWNDFromPage (HWND h);
+  void AdjustPageSize (HWND page);
 
   virtual bool Create (const Window * Parent = NULL,
 		       DWORD Style =
Index: res.rc
===================================================================
RCS file: /cvs/cygwin-apps/setup/res.rc,v
retrieving revision 2.52
diff -u -p -r2.52 res.rc
--- res.rc	26 Jul 2003 13:35:21 -0000	2.52
+++ res.rc	16 Oct 2003 16:32:49 -0000
@@ -45,8 +45,8 @@ BEGIN
                     BS_AUTORADIOBUTTON | WS_TABSTOP,101,84,115,10
     CONTROL         "Install from &Local Directory",IDC_SOURCE_CWD,"Button",
                     BS_AUTORADIOBUTTON | WS_TABSTOP,101,99,115,10
-    ICON            IDI_CYGWIN,IDC_STATIC,290,0,21,20
-    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
+    ICON            IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+    CONTROL         "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
     LTEXT           "Choose A Download Source",IDC_STATIC_HEADER_TITLE,7,0,
                     258,8,NOT WS_GROUP
@@ -63,8 +63,8 @@ BEGIN
                     BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,101,69,115,10
     CONTROL         "&Leave Virus scanner alone",IDC_LEAVE_AV,"Button",
                     BS_AUTORADIOBUTTON | WS_TABSTOP,101,84,115,10
-    ICON            IDI_CYGWIN,IDC_STATIC,290,0,21,20
-    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
+    ICON            IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+    CONTROL         "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
     LTEXT           "Choose whether to disable your virus scanner while installing.",IDC_STATIC_HEADER_TITLE,7,0,
                     258,8,NOT WS_GROUP
@@ -82,8 +82,8 @@ BEGIN
     EDITTEXT        IDC_LOCAL_DIR,58,83,165,15,ES_AUTOHSCROLL | WS_GROUP
     PUSHBUTTON      "B&rowse...",IDC_LOCAL_DIR_BROWSE,223,83,34,14
     GROUPBOX        "Local Package Directory",IDC_STATIC,53,67,210,45
-    ICON            IDI_CYGWIN,IDC_STATIC,290,0,21,20
-    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
+    ICON            IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+    CONTROL         "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
     LTEXT           "Select a directory where you want Setup to store the installation files it downloads.  The directory will be created if it does not already exist.",
                     IDC_STATIC,21,9,248,16,NOT WS_GROUP
@@ -109,8 +109,8 @@ BEGIN
                     WS_GROUP | WS_TABSTOP,170,120,90,8
     CONTROL         "&Unix",IDC_ROOT_BINARY,"Button",BS_AUTORADIOBUTTON | 
                     WS_TABSTOP,170,135,90,8
-    ICON            IDI_CYGWIN,IDC_STATIC,290,0,20,20
-    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
+    ICON            IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+    CONTROL         "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
     LTEXT           "Select the directory where you want to install Cygwin.  Also choose a few installation parameters.",
                     IDC_STATIC,21,9,239,16,NOT WS_GROUP
@@ -125,13 +125,13 @@ EXSTYLE WS_EX_CONTROLPARENT
 CAPTION "Cygwin Setup - Choose Download Site(s)"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    ICON            IDI_CYGWIN,IDC_STATIC,290,0,20,20
+    ICON            IDI_CYGWIN,IDC_HEADICON,290,0,21,20
     LISTBOX         IDC_URL_LIST,66,45,185,110,LBS_NOINTEGRALHEIGHT | 
                     LBS_EXTENDEDSEL | WS_VSCROLL | WS_HSCROLL | WS_GROUP | 
                     WS_TABSTOP
     LTEXT           "Available Download Sites:",IDC_STATIC,66,34,183,8,NOT 
                     WS_GROUP
-    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
+    CONTROL         "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
     LTEXT           "Choose a site from this list, or add your own sites to the list",
                     IDC_STATIC,21,9,239,16,NOT WS_GROUP
@@ -163,8 +163,8 @@ BEGIN
                     NOT WS_GROUP
     RTEXT           "Por&t",IDC_STATIC,85,125,30,12,SS_CENTERIMAGE | NOT 
                     WS_GROUP
-    ICON            IDI_CYGWIN,IDC_STATIC,290,0,21,20
-    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
+    ICON            IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+    CONTROL         "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
     LTEXT           "Setup needs to know how you want it to connect to the internet.  Choose the appropriate settings below.",
                     IDC_STATIC,21,9,239,16,NOT WS_GROUP
@@ -190,8 +190,8 @@ BEGIN
     LTEXT           "Package:",IDC_INS_BL_PACKAGE,45,100,47,8,NOT WS_GROUP
     LTEXT           "Total:",IDC_INS_BL_TOTAL,45,115,48,8,NOT WS_GROUP
     LTEXT           "Disk:",IDC_INS_BL_DISK,45,130,47,8,NOT WS_GROUP
-    ICON            IDI_CYGWIN,IDC_STATIC,290,0,20,20
-    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
+    ICON            IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+    CONTROL         "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
     LTEXT           "This page displays the progress of the download or installation.",
                     IDC_STATIC,21,9,239,16,NOT WS_GROUP
@@ -204,7 +204,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POP
 CAPTION "Proxy Authentication required"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    ICON            IDI_CYGWIN,IDC_STATIC,5,5,20,20
+    ICON            IDI_CYGWIN,IDC_HEADICON,5,5,21,20
     LTEXT           "Proxy &User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
                     WS_EX_RIGHT
     EDITTEXT        IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL
@@ -221,7 +221,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POP
 CAPTION "Server Authentication required"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    ICON            IDI_CYGWIN,IDC_STATIC,5,5,20,20
+    ICON            IDI_CYGWIN,IDC_HEADICON,5,5,21,20
     LTEXT           "&User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
                     WS_EX_RIGHT
     EDITTEXT        IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL
@@ -262,8 +262,8 @@ BEGIN
                     BS_AUTOCHECKBOX,108,78,100,8
     CONTROL         "Add icon to &Start Menu",IDC_ROOT_MENU,"Button",
                     BS_AUTOCHECKBOX,108,93,100,8
-    ICON            IDI_CYGWIN,IDC_STATIC,290,0,21,20
-    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
+    ICON            IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+    CONTROL         "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
     LTEXT           "Tell setup if you want it to create a few icons for convenient access to the Cygwin environment.",
                     IDC_STATIC,21,9,239,16,NOT WS_GROUP
@@ -276,7 +276,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POP
 CAPTION "FTP Authentication required"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    ICON            IDI_CYGWIN,IDC_STATIC,5,5,20,20
+    ICON            IDI_CYGWIN,IDC_HEADICON,5,5,21,20
     LTEXT           "&User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
                     WS_EX_RIGHT
     EDITTEXT        IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL
@@ -303,11 +303,11 @@ BEGIN
     CONTROL         "E&xp",IDC_CHOOSE_EXP,"Button",BS_AUTORADIOBUTTON , 
                     210,30,25,10
     PUSHBUTTON      "&View",IDC_CHOOSE_VIEW,245,30,20,10,WS_GROUP
-    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
+    CONTROL         "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
     CONTROL         "",IDC_LISTVIEW_POS,"Static",SS_BLACKFRAME | NOT 
                     WS_VISIBLE,7,41,303,134
-    ICON            IDI_CYGWIN,IDC_STATIC,290,0,20,20
+    ICON            IDI_CYGWIN,IDC_HEADICON,290,0,21,20
     LTEXT           "Select the packages you want setup to install.",
                     IDC_CHOOSE_INST_TEXT,21,9,239,16,NOT WS_GROUP
     LTEXT           "Select Packages",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT 
Index: resource.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/resource.h,v
retrieving revision 2.22
diff -u -p -r2.22 resource.h
--- resource.h  9 Mar 2003 01:39:42 -0000       2.22
+++ resource.h  16 Oct 2003 16:36:13 -0000
@@ -122,6 +122,8 @@
 #define IDC_CHOOSE_KEEP                        1069
 #define IDS_MISSING_LOG                        1070
 #define IDS_SKIP_PACKAGE               1071
+#define IDC_HEADICON                    1072
+#define IDC_HEADSEPARATOR               1073
 #define IDC_STATIC                      -1

 // Next default values for new objects
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]