Changeset 921 for trunk/dll/misc.c


Ignore:
Timestamp:
Jan 13, 2008, 2:21:00 AM (18 years ago)
Author:
Steven Levine
Message:

Rework Config menu. Move some to submenu. Add drag&drop dialog toggle.
Rework Walk dialog. Put entry field at the top.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/misc.c

    r907 r921  
    3636  05 Nov 07 GKY Use commafmtULL to display file sizes for large file support
    3737  22 Nov 07 GKY Use CopyPresParams to fix presparam inconsistencies in menus
     38  12 Jan 08 SHL Document SetConditionalCascade
    3839
    3940***********************************************************************/
     
    792793                return FALSE;
    793794            if (DosQueryPathInfo(pci->pszFileName,
    794                                  FIL_QUERYFULLNAME, szData, sizeof(szData))){
     795                                 FIL_QUERYFULLNAME,
     796                                 szData,
     797                                 sizeof(szData)))
     798            {
    795799              pci->pszFileName = xrealloc(pci->pszFileName, sizeof(szData), pszSrcFile, __LINE__);
    796800              strcpy(szData, pci->pszFileName);
     
    915919    fclose(fp);
    916920    ret = runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__,
    917                   NULL, NULL,
    918                   "VIEW.EXE \"%s\"",
    919                   BldQuotedFileName(szQuotedFileName, filename));
     921                  NULL, NULL,
     922                  "VIEW.EXE \"%s\"",
     923                  BldQuotedFileName(szQuotedFileName, filename));
    920924  }
    921925
     
    10701074}
    10711075
     1076/**
     1077 * Set default menu item to invoke for top level conditional cascade menu
     1078 * @param def is default menu id (i.e. IDM_...)
     1079 */
     1080
    10721081VOID SetConditionalCascade(HWND hwndMenu, USHORT id, USHORT def)
    10731082{
     
    10751084
    10761085  mi.iPosition = MIT_END;
    1077   mi.hItem = 0L;
    1078   mi.hwndSubMenu = (HWND) 0;
     1086  mi.hItem = 0;
     1087  mi.hwndSubMenu = (HWND)0;
    10791088  mi.afAttribute = 0;
    10801089  mi.afStyle = MIS_TEXT;
    1081   if (WinSendMsg
    1082       (hwndMenu, MM_QUERYITEM, MPFROM2SHORT(id, TRUE), MPFROMP(&mi))) {
     1090  if (WinSendMsg(hwndMenu,
     1091                 MM_QUERYITEM,
     1092                 MPFROM2SHORT(id, TRUE),
     1093                 MPFROMP(&mi)))
     1094  {
    10831095    WinSetWindowBits(mi.hwndSubMenu, QWL_STYLE, MS_CONDITIONALCASCADE,
    10841096                     MS_CONDITIONALCASCADE);
     
    14121424      QMSG qmsg;
    14131425      for (;;) {
    1414         DosSleep(1);
    1415         rc = WinPostMsg(h, msg, mp1, mp2);
    1416         if (rc)
    1417           break;                        // OK
    1418         if (!WinIsWindow((HAB) 0, h))
    1419           break;                        // Window gone
    1420         if (WinPeekMsg((HAB) 0, &qmsg, (HWND) 0, 0, 0, PM_NOREMOVE))
    1421           break;                        // Queue has message(s)
     1426        DosSleep(1);
     1427        rc = WinPostMsg(h, msg, mp1, mp2);
     1428        if (rc)
     1429          break;                        // OK
     1430        if (!WinIsWindow((HAB) 0, h))
     1431          break;                        // Window gone
     1432        if (WinPeekMsg((HAB) 0, &qmsg, (HWND) 0, 0, 0, PM_NOREMOVE))
     1433          break;                        // Queue has message(s)
    14221434      }                         // for
    14231435    }
     
    14831495      list[1] = NULL;
    14841496      ExecOnList(hwnd, binview, WINDOWED | SEPARATE, NULL, list, NULL,
    1485                 pszSrcFile, __LINE__);
     1497                pszSrcFile, __LINE__);
    14861498      return;
    14871499    }
     
    15111523      list[1] = NULL;
    15121524      ExecOnList(hwnd, bined, WINDOWED | SEPARATE, NULL, list, NULL,
    1513                 pszSrcFile, __LINE__);
     1525                pszSrcFile, __LINE__);
    15141526      return;
    15151527    }
     
    15211533      list[1] = NULL;
    15221534      ExecOnList(hwnd, editor, WINDOWED | SEPARATE, NULL, list, NULL,
    1523                 pszSrcFile, __LINE__);
     1535                pszSrcFile, __LINE__);
    15241536      return;
    15251537    }
Note: See TracChangeset for help on using the changeset viewer.