Changeset 872


Ignore:
Timestamp:
Nov 22, 2007, 11:11:21 PM (13 years ago)
Author:
Gregg Young
Message:

Fix failure of font changes and font colors on main menus (tickets 27 & 162)

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/HISTORY

    r871 r872  
    333.09(pre)
    44 o Correct hex edit buffer sizing to avoid data loss
    5 
    6 3.08
     5 o Use CopyPresParams to fix presparam inconsistencies in menus
     6 o Correct variable cast to fix hex code display problem
     7
     83.08
    79 o Cancel in walk directories dialog now directly closes dialog even if
    810   directory path text has changed (Gregg)
  • trunk/dll/arccnrs.c

    r835 r872  
    4747  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    4848  26 Aug 07 GKY DosSleep(1) in loops changed to (0)
     49  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
    4950
    5051***********************************************************************/
     
    11871188  case UM_VIEWSMENU:
    11881189    // fixme to disble menu items as needed
    1189     return MRFROMLONG(CheckMenu(&ArcCnrMenu, ARCCNR_POPUP));
     1190    return MRFROMLONG(CheckMenu(hwnd, &ArcCnrMenu, ARCCNR_POPUP));
    11901191
    11911192  case UM_FILESMENU:
    11921193    // fixme to disble menu items as needed
    1193     return MRFROMLONG(CheckMenu(&ArcMenu, ARC_POPUP));
     1194    return MRFROMLONG(CheckMenu(hwnd, &ArcMenu, ARC_POPUP));
    11941195
    11951196  case MM_PORTHOLEINIT:
     
    27702771
    27712772      case IDM_SHOWSELECT:
    2772         QuickPopup(hwnd, dcd, CheckMenu(&ArcCnrMenu, ARCCNR_POPUP),
     2773        QuickPopup(hwnd, dcd, CheckMenu(hwnd, &ArcCnrMenu, ARCCNR_POPUP),
    27732774                   IDM_SELECTSUBMENU);
    27742775        break;
    27752776
    27762777      case IDM_SHOWSORT:
    2777         QuickPopup(hwnd, dcd, CheckMenu(&ArcCnrMenu, ARCCNR_POPUP),
     2778        QuickPopup(hwnd, dcd, CheckMenu(hwnd, &ArcCnrMenu, ARCCNR_POPUP),
    27782779                   IDM_SORTSUBMENU);
    27792780        break;
     
    32953296                       MPFROM2SHORT(TRUE, CRA_CURSORED));
    32963297            MarkAll(hwnd, FALSE, FALSE, TRUE);
    3297             dcd->hwndLastMenu = CheckMenu(&ArcMenu, ARC_POPUP);
     3298            dcd->hwndLastMenu = CheckMenu(hwnd, &ArcMenu, ARC_POPUP);
    32983299          }
    32993300          else {
    3300             dcd->hwndLastMenu = CheckMenu(&ArcCnrMenu, ARCCNR_POPUP);
     3301            dcd->hwndLastMenu = CheckMenu(hwnd, &ArcCnrMenu, ARCCNR_POPUP);
    33013302            if (dcd->hwndLastMenu && !dcd->cnremphasized) {
    33023303              WinSendMsg(hwnd, CM_SETRECORDEMPHASIS, MPVOID,
  • trunk/dll/autoview.c

    r870 r872  
    2121  01 Sep 07 GKY Use xDosSetPathInfo to fix case where FS3 buffer crosses 64k boundry
    2222  27 Sep 07 SHL Correct ULONGLONG size formatting
     23  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
    2324
    2425***********************************************************************/
     
    874875
    875876  case WM_CONTEXTMENU:
    876     CheckMenu(&AutoMenu, (id == MAIN_AUTOVIEWMLE) ?
     877    CheckMenu(hwnd, &AutoMenu, (id == MAIN_AUTOVIEWMLE) ?
    877878              IDM_AUTOVIEWMLE : IDM_AUTOVIEW);
    878879    WinCheckMenuItem(AutoMenu, IDM_AUTOVIEWFILE, !fComments);
  • trunk/dll/collect.c

    r847 r872  
    4141  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    4242  26 Aug 07 GKY DosSleep(1) in loops changed to (0)
    43 
     43  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
    4444
    4545***********************************************************************/
     
    127127              if (dcd) {
    128128                SetViewMenu(hwndButtonPopup, dcd->flWindowAttr);
    129                 SetDetailsSwitches(hwndButtonPopup, dcd);
     129                SetDetailsSwitches(hwndButtonPopup, dcd);
     130                CopyPresParams(hwndButtonPopup, hwnd);
    130131              }
    131132
     
    354355
    355356  case UM_VIEWSMENU:
    356     return MRFROMLONG(CheckMenu(&CollectorCnrMenu, COLLECTORCNR_POPUP));
     357    return MRFROMLONG(CheckMenu(hwnd, &CollectorCnrMenu, COLLECTORCNR_POPUP));
    357358
    358359  case MM_PORTHOLEINIT:
     
    13581359        SetViewMenu((HWND) mp2, dcd->flWindowAttr);
    13591360        WinEnableMenuItem((HWND) mp2, IDM_RESELECT,
    1360                           (dcd->lastselection != NULL));
     1361                          (dcd->lastselection != NULL));
     1362        CopyPresParams((HWND) mp2, hwnd);
    13611363        break;
    13621364
     
    14601462      case IDM_SHOWSELECT:
    14611463        QuickPopup(hwnd, dcd,
    1462                    CheckMenu(&CollectorCnrMenu, COLLECTORCNR_POPUP),
     1464                   CheckMenu(hwnd, &CollectorCnrMenu, COLLECTORCNR_POPUP),
    14631465                   IDM_SELECTSUBMENU);
    14641466        break;
     
    14661468      case IDM_SHOWSORT:
    14671469        QuickPopup(hwnd, dcd,
    1468                    CheckMenu(&CollectorCnrMenu, COLLECTORCNR_POPUP),
     1470                   CheckMenu(hwnd, &CollectorCnrMenu, COLLECTORCNR_POPUP),
    14691471                   IDM_SORTSUBMENU);
    14701472        break;
     
    20522054      if (pci && (INT) pci != -1) {
    20532055        if (pci->attrFile & FILE_DIRECTORY)
    2054           menuHwnd = CheckMenu(&CollectorDirMenu, COLLECTORDIR_POPUP);
     2056          menuHwnd = CheckMenu(hwnd, &CollectorDirMenu, COLLECTORDIR_POPUP);
    20552057        else
    2056           menuHwnd = CheckMenu(&CollectorFileMenu, COLLECTORFILE_POPUP);
     2058          menuHwnd = CheckMenu(hwnd, &CollectorFileMenu, COLLECTORFILE_POPUP);
    20572059      }
    20582060      return MRFROMLONG(menuHwnd);
     
    20722074            MarkAll(hwnd, FALSE, FALSE, TRUE);
    20732075            if (pci->attrFile & FILE_DIRECTORY)
    2074               dcd->hwndLastMenu = CheckMenu(&CollectorDirMenu,
     2076              dcd->hwndLastMenu = CheckMenu(hwnd, &CollectorDirMenu,
    20752077                                            COLLECTORDIR_POPUP);
    20762078            else
    2077               dcd->hwndLastMenu = CheckMenu(&CollectorFileMenu,
     2079              dcd->hwndLastMenu = CheckMenu(hwnd, &CollectorFileMenu,
    20782080                                            COLLECTORFILE_POPUP);
    20792081          }
    20802082          else {
    2081             dcd->hwndLastMenu = CheckMenu(&CollectorCnrMenu,
     2083            dcd->hwndLastMenu = CheckMenu(hwnd, &CollectorCnrMenu,
    20822084                                          COLLECTORCNR_POPUP);
    20832085            if (dcd->hwndLastMenu && !dcd->cnremphasized) {
     
    20902092            if (dcd->hwndLastMenu == CollectorCnrMenu) {
    20912093              SetViewMenu(dcd->hwndLastMenu, dcd->flWindowAttr);
    2092               SetDetailsSwitches(dcd->hwndLastMenu, dcd);
     2094              SetDetailsSwitches(dcd->hwndLastMenu, dcd);
     2095              CopyPresParams(dcd->hwndLastMenu, hwnd);
    20932096              if (dcd->flWindowAttr & CV_MINI)
    20942097                WinCheckMenuItem(dcd->hwndLastMenu, IDM_MINIICONS, TRUE);
  • trunk/dll/dircnrs.c

    r847 r872  
    3131  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    3232  26 Aug 07 GKY DosSleep(1) in loops changed to (0)
    33 
     33  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
    3434
    3535***********************************************************************/
     
    132132            }
    133133          }
    134           hwndButtonPopup = WinLoadMenu(HWND_DESKTOP, FM3ModHandle, id);
     134          hwndButtonPopup = WinLoadMenu(HWND_DESKTOP, FM3ModHandle, id);
     135          CopyPresParams(hwndButtonPopup, hwnd);
    135136          if (hwndButtonPopup) {
    136137            WinSetWindowUShort(hwndButtonPopup, QWS_ID, id);
     
    474475
    475476  case UM_VIEWSMENU:
    476     return MRFROMLONG(CheckMenu(&DirCnrMenu, DIRCNR_POPUP));
     477    return MRFROMLONG(CheckMenu(hwnd, &DirCnrMenu, DIRCNR_POPUP));
    477478
    478479  case UM_DRIVECMD:
     
    15761577            WinEnableMenuItem((HWND) mp2, IDM_EDITTEXT, TRUE);
    15771578            WinEnableMenuItem((HWND) mp2, IDM_EDITBINARY, TRUE);
    1578             WinEnableMenuItem((HWND) mp2, IDM_ATTRS, TRUE);
     1579            WinEnableMenuItem((HWND) mp2, IDM_ATTRS, TRUE);
     1580            CopyPresParams((HWND) mp2, hwnd);
    15791581          }
    15801582        }
     
    15821584
    15831585      case IDM_VIEWSMENU:
    1584         SetViewMenu((HWND) mp2, dcd->flWindowAttr);
     1586        SetViewMenu((HWND) mp2, dcd->flWindowAttr);
    15851587        WinEnableMenuItem((HWND) mp2, IDM_RESELECT,
    1586                           (dcd->lastselection != NULL));
     1588                          (dcd->lastselection != NULL));
     1589        CopyPresParams((HWND) mp2, hwnd);
    15871590        if (isalpha(*dcd->directory)) {
    15881591          if (driveflags[toupper(*dcd->directory) - 'A'] & DRIVE_NOTWRITEABLE)
     
    17901793        QuickPopup(hwnd,
    17911794                   dcd,
    1792                    CheckMenu(&DirCnrMenu, DIRCNR_POPUP), IDM_SELECTSUBMENU);
     1795                   CheckMenu(hwnd, &DirCnrMenu, DIRCNR_POPUP), IDM_SELECTSUBMENU);
    17931796        break;
    17941797
    17951798      case IDM_SHOWSORT:
    1796         QuickPopup(hwnd, dcd, CheckMenu(&DirCnrMenu, DIRCNR_POPUP),
     1799        QuickPopup(hwnd, dcd, CheckMenu(hwnd, &DirCnrMenu, DIRCNR_POPUP),
    17971800                   IDM_SORTSUBMENU);
    17981801        break;
     
    25592562      if (pci && (INT) pci != -1) {
    25602563        if (pci->attrFile & FILE_DIRECTORY) {
    2561           menuHwnd = CheckMenu(&DirMenu, DIR_POPUP);
     2564          menuHwnd = CheckMenu(hwnd, &DirMenu, DIR_POPUP);
    25622565//            WinEnableMenuItem(DirMenu,IDM_TREE,TRUE);
    25632566        }
    25642567        else
    2565           menuHwnd = CheckMenu(&FileMenu, FILE_POPUP);
     2568          menuHwnd = CheckMenu(hwnd, &FileMenu, FILE_POPUP);
    25662569      }
    25672570      return MRFROMLONG(menuHwnd);
     
    26452648            MarkAll(hwnd, FALSE, FALSE, TRUE);
    26462649            if (pci->attrFile & FILE_DIRECTORY)
    2647               dcd->hwndLastMenu = CheckMenu(&DirMenu, DIR_POPUP);
     2650              dcd->hwndLastMenu = CheckMenu(hwnd, &DirMenu, DIR_POPUP);
    26482651            else
    2649               dcd->hwndLastMenu = CheckMenu(&FileMenu, FILE_POPUP);
     2652              dcd->hwndLastMenu = CheckMenu(hwnd, &FileMenu, FILE_POPUP);
    26502653          }
    26512654          else {
    2652             dcd->hwndLastMenu = CheckMenu(&DirCnrMenu, DIRCNR_POPUP);
     2655            dcd->hwndLastMenu = CheckMenu(hwnd, &DirCnrMenu, DIRCNR_POPUP);
    26532656            if (dcd->hwndLastMenu && !dcd->cnremphasized) {
    26542657              WinSendMsg(hwnd,
  • trunk/dll/fm3dll.h

    r860 r872  
    6464  04 Nov 07 GKY Add pszFmtFileSize to CNRITEM to display large file sizes
    6565  10 Nov 07 GKY Add ThousandSeparator variable for file sizes NLS tseparator.
     66  22 Nov 07 GKY Use CopyPresParams in CheckMenu to fix presparam inconsistencies in menus
    6667
    6768***********************************************************************/
     
    742743VOID OpenEdit(HWND hwnd);
    743744VOID PortholeInit(HWND hwndNew, MPARAM mp1, MPARAM mp2);
    744 HWND CheckMenu(HWND * hwndMenu, USHORT id);
     745HWND CheckMenu(HWND hwnd, HWND * hwndMenu, USHORT id);
    745746SHORT AddToListboxBottom(HWND hwnd, CHAR * str);
    746747VOID SetSysMenu(HWND hwndSysMenu);
  • trunk/dll/mainwnd.c

    r847 r872  
    4242  19 Aug 07 SHL Rework SaveDirCnrState to return better error info
    4343  30 Aug 07 SHL Add accelerator support to quicklist windows
     44  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
    4445
    4546***********************************************************************/
     
    12681269      hwndMenu = WinLoadMenu(hwnd, FM3ModHandle, ID_BUTTONMENU);
    12691270    DosExitCritSec();
    1270     SetPresParams(hwndMenu, NULL, NULL, NULL, GetPString(IDS_10SYSPROTEXT));
     1271    // SetPresParams(hwndMenu, NULL, NULL, NULL, GetPString(IDS_10SYSPROTEXT));
    12711272    if (PopupMenu(hwnd, hwnd, hwndMenu))
    12721273      WinShowWindow(hwndMenu, TRUE);
     
    21792180
    21802181      SetPresParams(hwnd,
    2181                     &RGBGREY,
    2182                     &RGBBLACK, &RGBGREY, GetPString(IDS_8HELVBOLDTEXT));
     2182                    &RGBGREY,
     2183                    &RGBBLACK, &RGBGREY, GetPString(IDS_8HELVBOLDTEXT));
    21832184      return mr;
    21842185    }
     
    54455446  case UM_CONTEXTMENU:
    54465447  case WM_CONTEXTMENU:
    5447     if (CheckMenu(&MainPopupMenu, MAIN_POPUP)) {
     5448    if (CheckMenu(hwnd, &MainPopupMenu, MAIN_POPUP)) {
    54485449      SetToggleChecks(MainPopupMenu);
    54495450      PopupMenu(hwnd, hwnd, MainPopupMenu);
  • trunk/dll/misc.c

    r860 r872  
    3535  01 Sep 07 GKY Use xDosSetPathInfo to fix case where FS3 buffer crosses 64k boundry
    3636  05 Nov 07 GKY Use commafmtULL to display file sizes for large file support
     37  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
    3738
    3839***********************************************************************/
     
    15641565      WinSetParent(mi.hwndSubMenu, hwndMenu, FALSE);
    15651566      WinSetWindowUShort(mi.hwndSubMenu, QWS_ID, IDM_FILESMENU);
     1567      CopyPresParams(mi.hwndSubMenu, hwndNow);
    15661568      mi.afStyle = MIS_SUBMENU;
    15671569      ulStyle = WinQueryWindowULong(mi.hwndSubMenu, QWL_STYLE);
     
    15951597      WinSetParent(mi.hwndSubMenu, hwndMenu, FALSE);
    15961598      WinSetWindowUShort(mi.hwndSubMenu, QWS_ID, IDM_VIEWSMENU);
     1599      CopyPresParams(mi.hwndSubMenu, hwndNow);
    15971600      mi.afStyle = MIS_SUBMENU;
    15981601      ulStyle = WinQueryWindowULong(mi.hwndSubMenu, QWL_STYLE);
     
    16061609}
    16071610
    1608 HWND CheckMenu(HWND * hwndMenu, USHORT id)
     1611HWND CheckMenu(HWND hwnd, HWND * hwndMenu, USHORT id)
    16091612{
    16101613  /* load and adjust menus as required */
     
    16131616    if (hwndMenu == &DirMenu) {
    16141617      WinSetWindowUShort(DirMenu, QWS_ID, IDM_FILESMENU);
     1618      CopyPresParams(*hwndMenu, hwnd);
    16151619      SetConditionalCascade(DirMenu, IDM_COMMANDSMENU, IDM_DOITYOURSELF);
    16161620      SetConditionalCascade(DirMenu, IDM_COPYMENU, IDM_COPY);
     
    16321636    else if (hwndMenu == &TreeMenu) {
    16331637      WinSetWindowUShort(TreeMenu, QWS_ID, IDM_FILESMENU);
     1638      CopyPresParams(*hwndMenu, hwnd);
    16341639      SetConditionalCascade(TreeMenu, IDM_COMMANDSMENU, IDM_DOITYOURSELF);
    16351640      SetConditionalCascade(TreeMenu, IDM_SAVESUBMENU, IDM_SAVETOCLIP);
     
    16471652    else if (hwndMenu == &ArcMenu) {
    16481653      WinSetWindowUShort(ArcMenu, QWS_ID, IDM_FILESMENU);
     1654      CopyPresParams(*hwndMenu, hwnd);
    16491655      SetConditionalCascade(ArcMenu, IDM_EXTRACTSUBMENU, IDM_EXTRACT);
    16501656      SetConditionalCascade(ArcMenu, IDM_EDITSUBMENU, IDM_EDIT);
     
    16561662    else if (hwndMenu == &FileMenu) {
    16571663      WinSetWindowUShort(FileMenu, QWS_ID, IDM_FILESMENU);
     1664      CopyPresParams(*hwndMenu, hwnd);
    16581665      SetConditionalCascade(FileMenu, IDM_COMMANDSMENU, IDM_DOITYOURSELF);
    16591666      SetConditionalCascade(FileMenu, IDM_COPYMENU, IDM_COPY);
     
    16761683    else if (hwndMenu == &DirCnrMenu) {
    16771684      WinSetWindowUShort(DirCnrMenu, QWS_ID, IDM_VIEWSMENU);
     1685      CopyPresParams(*hwndMenu, hwnd);
    16781686      SetConditionalCascade(DirCnrMenu, IDM_MISCSUBMENU, IDM_SIZES);
    16791687      SetConditionalCascade(DirCnrMenu, IDM_OPENSUBMENU, IDM_OPENSETTINGSME);
     
    16841692    else if (hwndMenu == &TreeCnrMenu) {
    16851693      WinSetWindowUShort(TreeCnrMenu, QWS_ID, IDM_VIEWSMENU);
     1694      CopyPresParams(*hwndMenu, hwnd);
    16861695      SetConditionalCascade(TreeCnrMenu, IDM_PARTITIONSMENU, IDM_PARTITION);
    16871696    }
    16881697    else if (hwndMenu == &ArcCnrMenu) {
    16891698      WinSetWindowUShort(ArcCnrMenu, QWS_ID, IDM_VIEWSMENU);
     1699      CopyPresParams(*hwndMenu, hwnd);
    16901700      SetConditionalCascade(ArcCnrMenu, IDM_EXTRACTSUBMENU, IDM_ARCEXTRACT);
    16911701      if (fWorkPlace)
     
    16951705    else if (hwndMenu == &CollectorCnrMenu) {
    16961706      WinSetWindowUShort(CollectorCnrMenu, QWS_ID, IDM_VIEWSMENU);
     1707      CopyPresParams(*hwndMenu, hwnd);
    16971708      SetConditionalCascade(CollectorCnrMenu, IDM_COLLECTMENU,
    16981709                            IDM_COLLECTFROMCLIP);
     
    17001711    else if (hwndMenu == &CollectorFileMenu) {
    17011712      WinSetWindowUShort(CollectorFileMenu, QWS_ID, IDM_FILESMENU);
     1713      CopyPresParams(*hwndMenu, hwnd);
    17021714      SetConditionalCascade(CollectorFileMenu, IDM_COMMANDSMENU,
    17031715                            IDM_DOITYOURSELF);
     
    17221734    else if (hwndMenu == &CollectorDirMenu) {
    17231735      WinSetWindowUShort(CollectorDirMenu, QWS_ID, IDM_FILESMENU);
     1736      CopyPresParams(*hwndMenu, hwnd);
    17241737      SetConditionalCascade(CollectorDirMenu, IDM_COMMANDSMENU,
    17251738                            IDM_DOITYOURSELF);
     
    17441757    else if (hwndMenu == &MainPopupMenu) {
    17451758      WinSetWindowUShort(MainPopupMenu, QWS_ID, IDM_MAINPOPUP);
     1759      CopyPresParams(*hwndMenu, hwnd);
    17461760      SetConditionalCascade(MainPopupMenu, IDM_TOOLSUBMENU, IDM_TOOLBAR);
    17471761      SetConditionalCascade(MainPopupMenu, IDM_AUTOVIEWSUBMENU, IDM_AUTOVIEW);
  • trunk/dll/presparm.c

    r793 r872  
    1111  22 Jul 06 SHL Check more run time errors
    1212  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
     13  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
    1314
    1415***********************************************************************/
  • trunk/dll/seeall.c

    r850 r872  
    32333233        pAD->hwndPopup =
    32343234          WinLoadMenu(HWND_DESKTOP, FM3ModHandle, SEEALL_POPUP);
    3235         if (pAD->hwndPopup) {
     3235        if (pAD->hwndPopup) {
    32363236          WinSetPresParam(pAD->hwndPopup, PP_FONTNAMESIZE,
    3237                           (ULONG) strlen(GetPString(IDS_8HELVTEXT)) + 1,
    3238                           (PVOID) GetPString(IDS_8HELVTEXT));
     3237                          (ULONG) strlen(GetPString(IDS_8HELVTEXT)) + 1,
     3238                          (PVOID) GetPString(IDS_8HELVTEXT));
    32393239          SetConditionalCascade(pAD->hwndPopup,
    32403240                                IDM_DELETESUBMENU,
  • trunk/dll/treecnr.c

    r847 r872  
    4141  22 Aug 07 SHL Disable DbgMsgs shipped with 3.0.8beta1
    4242  26 Aug 07 SHL Revert to DosSleep(0)
     43  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
    4344
    4445***********************************************************************/
     
    458459
    459460  case UM_VIEWSMENU:
    460     return MRFROMLONG(CheckMenu(&TreeCnrMenu, TREECNR_POPUP));
     461    return MRFROMLONG(CheckMenu(hwnd, &TreeCnrMenu, TREECNR_POPUP));
    461462
    462463  case UM_TIMER:
     
    10171018      if (pci && (INT) pci != -1) {
    10181019        if (IsRoot(pci->pszFileName))
    1019           menuHwnd = CheckMenu(&TreeMenu, TREE_POPUP);
     1020          menuHwnd = CheckMenu(hwnd, &TreeMenu, TREE_POPUP);
    10201021        else {
    1021           menuHwnd = CheckMenu(&DirMenu, DIR_POPUP);
     1022          menuHwnd = CheckMenu(hwnd, &DirMenu, DIR_POPUP);
    10221023//            WinEnableMenuItem(DirMenu,
    10231024//                              IDM_TREE,
     
    10251026        }
    10261027        if (!(pci->attrFile & FILE_DIRECTORY))
    1027           menuHwnd = CheckMenu(&FileMenu, FILE_POPUP);
     1028          menuHwnd = CheckMenu(hwnd, &FileMenu, FILE_POPUP);
    10281029      }
    10291030      return MRFROMLONG(menuHwnd);
     
    15921593            MarkAll(hwnd, FALSE, FALSE, TRUE);
    15931594            if (!(pci->attrFile & FILE_DIRECTORY))
    1594               dcd->hwndLastMenu = CheckMenu(&FileMenu, FILE_POPUP);
     1595              dcd->hwndLastMenu = CheckMenu(hwnd, &FileMenu, FILE_POPUP);
    15951596            else if (!IsRoot(pci->pszFileName))
    1596               dcd->hwndLastMenu = CheckMenu(&DirMenu, DIR_POPUP);
     1597              dcd->hwndLastMenu = CheckMenu(hwnd, &DirMenu, DIR_POPUP);
    15971598            else
    1598               dcd->hwndLastMenu = CheckMenu(&TreeMenu, TREE_POPUP);
     1599              dcd->hwndLastMenu = CheckMenu(hwnd, &TreeMenu, TREE_POPUP);
    15991600          }
    16001601          else {
    1601             dcd->hwndLastMenu = CheckMenu(&TreeCnrMenu, TREECNR_POPUP);
     1602            dcd->hwndLastMenu = CheckMenu(hwnd, &TreeCnrMenu, TREECNR_POPUP);
    16021603            if (dcd->hwndLastMenu && !dcd->cnremphasized) {
    16031604              WinSendMsg(hwnd, CM_SETRECORDEMPHASIS, MPVOID,
     
    20902091            WinEnableMenuItem((HWND) mp2, IDM_MOVEMENU, !underenv
    20912092                              && writeable);
    2092             WinEnableMenuItem((HWND) mp2, IDM_RENAME, !underenv && writeable);
     2093            WinEnableMenuItem((HWND) mp2, IDM_RENAME, !underenv && writeable);
     2094            CopyPresParams((HWND) mp2, hwnd);
    20932095
    20942096          }
     
    20992101        WinCheckMenuItem((HWND) mp2,
    21002102                         IDM_MINIICONS, ((dcd->flWindowAttr & CV_MINI) != 0));
    2101         WinEnableMenuItem((HWND) mp2, IDM_RESELECT, FALSE);
     2103        WinEnableMenuItem((HWND) mp2, IDM_RESELECT, FALSE);
     2104        CopyPresParams((HWND) mp2, hwnd);
    21022105        break;
    21032106
    21042107      case IDM_COMMANDSMENU:
    2105         SetupCommandMenu((HWND) mp2, hwnd);
     2108        SetupCommandMenu((HWND) mp2, hwnd);
     2109        CopyPresParams((HWND) mp2, hwnd);
    21062110        break;
    21072111
    21082112      case IDM_SORTSUBMENU:
    21092113        SetSortChecks((HWND) mp2, TreesortFlags);
    2110         break;
     2114        CopyPresParams((HWND) mp2, hwnd);
     2115        break;
    21112116
    21122117      case IDM_WINDOWSMENU:
    21132118        SetupWinList((HWND) mp2,
    2114                      (hwndMain) ? hwndMain : (HWND) 0, dcd->hwndFrame);
     2119                     (hwndMain) ? hwndMain : (HWND) 0, dcd->hwndFrame);
     2120        CopyPresParams((HWND) mp2, hwnd);
    21152121        break;
    21162122      }
     
    23572363
    23582364      case IDM_SHOWSORT:
    2359         QuickPopup(hwnd, dcd, CheckMenu(&TreeCnrMenu, TREECNR_POPUP),
     2365        QuickPopup(hwnd, dcd, CheckMenu(hwnd, &TreeCnrMenu, TREECNR_POPUP),
    23602366                   IDM_SORTSUBMENU);
    23612367        break;
    23622368
    23632369      case IDM_SHOWSELECT:
    2364         QuickPopup(hwnd, dcd, CheckMenu(&TreeCnrMenu, TREECNR_POPUP),
     2370        QuickPopup(hwnd, dcd, CheckMenu(hwnd, &TreeCnrMenu, TREECNR_POPUP),
    23652371                   IDM_SELECTSUBMENU);
    23662372        break;
Note: See TracChangeset for help on using the changeset viewer.