Ignore:
Timestamp:
Aug 17, 2000, 7:08:15 PM (25 years ago)
Author:
cbratschi
Message:

wizard workaround

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/propsheet.cpp

    r4006 r4026  
    1 /* $Id: propsheet.cpp,v 1.7 2000-08-13 17:12:39 cbratschi Exp $ */
     1/* $Id: propsheet.cpp,v 1.8 2000-08-17 17:08:15 cbratschi Exp $ */
    22/*
    33 * Property Sheets
     
    1111 *   - Tab order
    1212 *   - Unicode property sheets
     13 *   - Wizard bugs
    1314 */
    1415
     
    133134static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, PropSheetInfo* psInfo);
    134135static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags);
    135 static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg);
     136static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg,PropSheetInfo* psInfo);
    136137static BOOL PROPSHEET_IsDialogMessage(HWND hwnd, LPMSG lpMsg);
    137138static INT PROPSHEET_DoDialogBox( HWND hwnd, HWND owner);
     
    551552  RECT rcSheetRect, rcPage, rcLine, rcSheetClient;
    552553  HWND hwndLine = GetDlgItem(hwndDlg, IDC_SUNKEN_LINE);
    553   PADDING_INFO padding = PROPSHEET_GetPaddingInfoWizard(hwndDlg);
     554  PADDING_INFO padding = PROPSHEET_GetPaddingInfoWizard(hwndDlg,psInfo);
    554555
    555556  GetClientRect(hwndDlg, &rcSheetClient);
     
    653654  RECT rc;
    654655  int buttonHeight, lineHeight;
    655   PADDING_INFO padding = PROPSHEET_GetPaddingInfoWizard(hwndDlg);
     656  PADDING_INFO padding = PROPSHEET_GetPaddingInfoWizard(hwndDlg,psInfo);
    656657
    657658  /* Get the height of buttons */
     
    796797  int num_buttons = 3;
    797798  int buttonWidth, buttonHeight, lineHeight, lineWidth;
    798   PADDING_INFO padding = PROPSHEET_GetPaddingInfoWizard(hwndParent);
     799  PADDING_INFO padding = PROPSHEET_GetPaddingInfoWizard(hwndParent,psInfo);
    799800
    800801  if (psInfo->hasHelp)
     
    920921 * Vertical spacing is the distance between the line and the buttons.
    921922 */
    922 static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg)
     923static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg,PropSheetInfo* psInfo)
    923924{
    924925  PADDING_INFO padding;
     
    956957  padding.x = ptHelp.x - ptCancel.x;
    957958  padding.y = ptHelp.y - ptLine.y;
     959
     960//CB: BUG: psInfo->hasHelp not checked -> negative values
     961//    add better wizard handling, fix button placement bugs FIXME
     962//
     963//    workaround for now:
     964if (padding.x < 0) padding.x = 0;
     965if (padding.y < 0) padding.y = 0;
    958966
    959967  return padding;
     
    11751183
    11761184  if (psInfo->ppshheader->dwFlags & PSH_WIZARD)
    1177     padding = PROPSHEET_GetPaddingInfoWizard(hwndDlg);
     1185    padding = PROPSHEET_GetPaddingInfoWizard(hwndDlg,psInfo);
    11781186  else
    11791187  {
     
    11871195  }
    11881196
    1189   SetWindowPos(psInfo->proppage[index].hwndPage, HWND_TOP,
    1190                rc.left + padding.x,
    1191                rc.top + padding.y,
    1192                pageWidth, pageHeight, SWP_SHOWWINDOW);
     1197  SetWindowPos(psInfo->proppage[index].hwndPage,HWND_TOP,rc.left+padding.x,rc.top+padding.y,pageWidth,pageHeight,SWP_SHOWWINDOW);
    11931198
    11941199  if (!(psInfo->ppshheader->dwFlags & PSH_WIZARD))
Note: See TracChangeset for help on using the changeset viewer.