Changeset 136


Ignore:
Timestamp:
Feb 3, 2002, 11:46:54 AM (24 years ago)
Author:
umoeller
Message:

Buncha fixes.

Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/dialog.h

    r132 r136  
    6262
    6363    #define SZL_AUTOSIZE                (-1)
     64    #define SZL_LARGEST_ROW_WIDTH       (-2)
    6465
    6566    #define CTL_COMMON_FONT             ((PCSZ)-1)
     
    106107                // proposed size; a number of special flags are
    107108                // available (per cx, cy field):
    108                 // -- SZL_AUTOSIZE: determine size automatically.
     109                // -- SZL_AUTOSIZE (-1): determine size automatically.
    109110                //    Works only for statics with SS_TEXT and
    110111                //    SS_BITMAP.
     112                // -- Any other _negative_ value is considered a
     113                //    percentage of the largest row width in the
     114                //    table. For example, -50 would mean 50% of
     115                //    the largest row in the table. This is valid
     116                //    for the CX field only.
    111117                // This field is IGNORED if the CONTROLDEF appears
    112118                // with a START_NEW_TABLE type in _DLGHITEM.
     
    190196    #define COMMON_SPACING          3
    191197
    192     #define CONTROLDEF_GROUP(pcsz, id) { WC_STATIC, pcsz, \
     198    #define CONTROLDEF_GROUP(pcsz, id, cx, cy) { WC_STATIC, pcsz, \
    193199            WS_VISIBLE | SS_GROUPBOX | DT_MNEMONIC, \
    194             id, CTL_COMMON_FONT, 0, { -1, -1 }, 0 }
     200            id, CTL_COMMON_FONT, 0, { cx, cy }, 0 }
    195201
    196202    #define CONTROLDEF_TEXT(pcsz, id, cx, cy) { WC_STATIC, pcsz, \
  • trunk/include/helpers/exeh.h

    r131 r136  
    11651165        // returned by exehOpen):
    11661166        ULONG           ulExeFormat;
     1167#endif
    11671168                    #define EXEFORMAT_OLDDOS        1
    11681169                    #define EXEFORMAT_NE            2
     
    11731174                    #define EXEFORMAT_COM           7       // added V0.9.16 (2002-01-04) [umoeller]
    11741175
     1176#ifndef __STRIP_DOWN_EXECUTABLE__
    11751177        BOOL            fLibrary,           // TRUE if this is a DLL
    11761178                                            // (works for NE, LX, PE)
     
    11791181
    11801182        ULONG           ulOS;
     1183#endif
    11811184                // target operating system as flagged in one of
    11821185                // the EXE headers; one of:
     
    11981201                                // if PE optional header was successfully read
    11991202
     1203#ifndef __STRIP_DOWN_EXECUTABLE__
    12001204        // The following fields are only set after
    12011205        // an extra call to exehQueryBldLevel (NE and LX only):
  • trunk/readme.txt

    r85 r136  
    11XWP Helpers 0.9.7 README
    22(W) Ulrich M”ller, October 26, 2000
    3 Last updated July 5, 2001, Ulrich M”ller
     3Last updated Feb 03, 2002 Ulrich M”ller
    44
    55
     
    99    1. LICENSE, COPYRIGHT, DISCLAIMER
    1010    2. INTRODUCTION
    11     3. CREATING CODE DOCUMENTATION
    12     4. COMPILING
    13     5. INCLUDING HEADER FILES
     11    3. EXECUTABLE TOOLS
     12    4. CREATING CODE DOCUMENTATION
     13    5. COMPILING
     14    6. INCLUDING HEADER FILES
    1415
    1516
     
    9697
    9798
    98 3. CREATING CODE DOCUMENTATION
     993. EXECUTABLE TOOLS
     100===================
     101
     102    The root directory of this repository contains a few executables
     103    in binary form that are used by XWorkplace and WarpIN.
     104
     105
     106    --  FastDep.exe was written by Knut Stange Osmundsen (taken from
     107        the Odin sources) and is used by the "nmake dep" facility
     108        of both WarpIN and XWorkplace. This scans C source files
     109        and writes dependencies for the makefiles automatically.
     110
     111    --  h2i.exe was written by me (the sources are in the xwphelpers
     112        repository, in the "tools" directory) to translate a bunch
     113        of HTML files to IPF.
     114
     115    --  strrpl.exe was written by me (the sources are in the warpin
     116        repository, in the "tools" directory) to replace strings in
     117        text files.
     118
     119    --  xdoc.exe was written by me (the sources are in the warpin
     120        repository, in the "tools" directory) to extract documentation
     121        from C source files directory. See "Creating code documentation"
     122        below.
     123
     124
     1254. CREATING CODE DOCUMENTATION
    99126==============================
    100127
     
    112139
    113140
    114 4. COMPILING
     1415. COMPILING
    115142============
    116143
     
    157184
    158185
    159 5. INCLUDING HEADER FILES
     1866. INCLUDING HEADER FILES
    160187=========================
    161188
  • trunk/src/helpers/dialog.c

    r132 r136  
    317317        {
    318318            RECTL rcl = {0, 0, 0, 0};
    319             if (pControlDef->szlControlProposed.cx != -1)
     319            if (pControlDef->szlControlProposed.cx > 0)
    320320                rcl.xRight = pControlDef->szlControlProposed.cx;   // V0.9.12 (2001-05-31) [umoeller]
    321321            else
    322322                rcl.xRight = winhQueryScreenCX() * 2 / 3;
    323             if (pControlDef->szlControlProposed.cy != -1)
     323            if (pControlDef->szlControlProposed.cy > 0)
    324324                rcl.yTop = pControlDef->szlControlProposed.cy;   // V0.9.12 (2001-05-31) [umoeller]
    325325            else
     
    451451 *@@changed V0.9.16 (2001-10-15) [umoeller]: fixed ugly group table spacings
    452452 *@@changed V0.9.16 (2001-10-15) [umoeller]: added APIRET
     453 *@@changed V0.9.16 (2002-02-02) [umoeller]: added support for explicit group size
    453454 */
    454455
     
    476477            if (pTableDef->pCtlDef)
    477478            {
    478                 // yes: make this wider
     479                // yes:
     480
     481                // check if maybe an explicit size was specified
     482                // for the group; if that is larger than what
     483                // we've calculated above, use it instead
     484                if (pTableDef->pCtlDef->szlControlProposed.cx > pColumnDef->cpControl.cx)
     485                        // should be -1 for auto-size
     486                    pColumnDef->cpControl.cx = pTableDef->pCtlDef->szlControlProposed.cx;
     487
     488                if (pTableDef->pCtlDef->szlControlProposed.cy > pColumnDef->cpControl.cy)
     489                        // should be -1 for auto-size
     490                    pColumnDef->cpControl.cy = pTableDef->pCtlDef->szlControlProposed.cy;
     491
     492                // in any case, make this wider
    479493                ulXSpacing =    2 * PM_GROUP_SPACING_X;
    480494                ulYSpacing =    // 3 * PM_GROUP_SPACING_X;
     
    490504        SIZEL       szlAuto;
    491505
    492         if (    (pszl->cx == -1)
    493              || (pszl->cy == -1)
     506        if (    (pszl->cx < -1)
     507             && (pszl->cx >= -100)
    494508           )
     509        {
     510            // other negative CX value:
     511            // this is then a percentage of the row width... ignore for now
     512            // V0.9.16 (2002-02-02) [umoeller]
     513            szlAuto.cx = 0;
     514            szlAuto.cy = 0;
     515        }
     516        else if (    (pszl->cx == -1)
     517                  || (pszl->cy == -1)
     518                )
    495519        {
    496520            arc = CalcAutoSize(pControlDef,
     
    501525        if (!arc)
    502526        {
    503             if (pszl->cx == -1)
     527            if (pszl->cx < 0)
    504528                pColumnDef->cpControl.cx = szlAuto.cx;
    505529            else
    506530                pColumnDef->cpControl.cx = pszl->cx;
    507531
    508             if (pszl->cy == -1)
     532            if (pszl->cy < 0)
    509533                pColumnDef->cpControl.cy = szlAuto.cy;
    510534            else
     
    10981122            if (ProcessMode == PROCESS_CALC_SIZES)
    10991123            {
     1124                // all sizes have now been computed:
    11001125                pszlClient->cx += pTableDefThis->cpTable.cx;
    11011126                pszlClient->cy += pTableDefThis->cpTable.cy;
  • trunk/src/helpers/linklist.c

    r132 r136  
    961961 *      sort function pfnSort, which works similar to those of the
    962962 *      container sorts, i.e. it must be declared as a
    963  +          SHORT fnSort(void* pItem1, void* pItem1, void* pStorage)
     963 +          SHORT fnSort(void* pItem1, void* pItem2, void* pStorage)
    964964 *
    965965 *      These sort functions need to return the following:
  • trunk/src/helpers/nls.c

    r121 r136  
    459459 *
    460460 *      This uses DosMapCase with the default system country
    461  *      code and the process's codepage.
     461 *      code and the process's codepage. WARNING: DosMapCase
     462 *      is a 16-bit API and therefore quite slow. Use this
     463 *      with care.
    462464 *
    463465 *@@added V0.9.16 (2001-10-25) [umoeller]
Note: See TracChangeset for help on using the changeset viewer.