Ignore:
Timestamp:
Aug 14, 1999, 6:13:16 PM (26 years ago)
Author:
cbratschi
Message:

wine-990731 update

File:
1 edited

Legend:

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

    r295 r496  
    1 /* $Id: propsheet.c,v 1.6 1999-07-12 15:58:48 cbratschi Exp $ */
     1/* $Id: propsheet.c,v 1.7 1999-08-14 16:13:12 cbratschi Exp $ */
    22/*
    33 * Property Sheets
     
    627627    ((MyDLGTEMPLATEEX*)pTemplate)->style &= ~WS_SYSMENU;
    628628    ((MyDLGTEMPLATEEX*)pTemplate)->style &= ~WS_POPUP;
     629    ((MyDLGTEMPLATEEX*)pTemplate)->style &= ~WS_DISABLED;
    629630  }
    630631  else
     
    635636    pTemplate->style &= ~WS_SYSMENU;
    636637    pTemplate->style &= ~WS_POPUP;
     638    pTemplate->style &= ~WS_DISABLED;
     639
    637640  }
    638641
     
    668671
    669672  if (showPage)
     673  {
     674    NMHDR hdr;
     675
     676    hdr.hwndFrom = hwndParent;
     677    hdr.code = PSN_SETACTIVE;
     678
     679    /*
     680     * Send the notification before showing the page.
     681     */
     682    SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &hdr);
     683
    670684    ShowWindow(hwndPage, SW_SHOW);
     685  }
    671686  else
    672687    ShowWindow(hwndPage, SW_HIDE);
     
    899914    return FALSE;
    900915
    901 //  if (hpage != NULL)
    902 //    FIXME(propsheet, "Implement HPROPSHEETPAGE!\n");
    903 //  else
    904     hwndPage = psInfo->proppage[index].hwndPage;
    905 
    906   /*
    907    * Notify the new page.
    908    */
    909   hdr.code = PSN_SETACTIVE;
    910 
    911   SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &hdr);
     916  /*
     917   * hpage takes precedence over index.
     918   */
     919  if (hpage != NULL)
     920  {
     921    index = PROPSHEET_GetPageIndex(hpage, psInfo);
     922
     923    if (index == -1)
     924    {
     925      //TRACE("Could not find page to remove!\n");
     926      return FALSE;
     927    }
     928  }
     929
     930  hwndPage = psInfo->proppage[index].hwndPage;
     931
     932  /*
     933   * Notify the new page if it's already created.
     934   * If not it will get created and notified in PROPSHEET_ShowPage.
     935   */
     936  if (hwndPage)
     937  {
     938    int result;
     939    hdr.code = PSN_SETACTIVE;
     940
     941    result = SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &hdr);
     942    /*
     943     * TODO: check return value.
     944     */
     945  }
    912946
    913947  /*
     
    13401374      if (pnmh->code == TCN_SELCHANGE)
    13411375      {
    1342         PropSheetInfo* psInfo = (PropSheetInfo*) GetPropA(hwnd,
    1343                                                           PropSheetInfoStr);
    13441376        int index = SendMessageA(pnmh->hwndFrom, TCM_GETCURSEL, 0, 0);
    1345         HWND hwndHelp  = GetDlgItem(hwnd, IDHELP);
    1346 
    1347         PROPSHEET_ShowPage(hwnd, index, psInfo);
    1348 
    1349         if (psInfo->proppage[index].hasHelp)
    1350           EnableWindow(hwndHelp, TRUE);
    1351         else
    1352           EnableWindow(hwndHelp, FALSE);
     1377        PROPSHEET_SetCurSel(hwnd, index, 0);
    13531378      }
    13541379
Note: See TracChangeset for help on using the changeset viewer.