Ignore:
Timestamp:
Jan 1, 2001, 4:30:29 PM (25 years ago)
Author:
umoeller
Message:

Tons of updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/winh.c

    r17 r18  
    16081608 *      area and will adjust coordinates accordingly. This can
    16091609 *      happen when changing video resolutions.
     1610 *
     1611 *@@changed V0.9.7 (2000-12-20) [umoeller]: fixed invalid params if INI key not found
    16101612 */
    16111613
     
    16171619{
    16181620    BOOL    brc = FALSE;
    1619     SWP     swp, swpNow;
     1621    SWP     swp;
    16201622    ULONG   cbswp = sizeof(swp);
    1621     ULONG   fl2 = fl;
     1623    ULONG   fl2 = (fl & ~SWP_ZORDER);
    16221624
    16231625    if (PrfQueryProfileData(hIni, pszApp, pszKey, &swp, &cbswp))
     
    16311633        {
    16321634            // if no resize, we need to get the current position
     1635            SWP swpNow;
    16331636            brc = WinQueryWindowPos(hwnd, &swpNow);
    16341637            swp.cx = swpNow.cx;
     
    16491652    }
    16501653    else
     1654    {
    16511655        // window pos not found in INI: unset SWP_MOVE etc.
     1656        WinQueryWindowPos(hwnd, &swp);
    16521657        fl2 &= ~(SWP_MOVE | SWP_SIZE);
     1658    }
    16531659
    16541660    WinSetWindowPos(hwnd,
     
    21242130 *
    21252131 *      Example:
    2126  +      PPRESPARAMS ppp = NULL;
    2127  +      CHAR szFont[] = "9.WarpSans";
    2128  +      LONG lColor = CLR_WHITE;
    2129  +      winhStorePresParam(&ppp, PP_FONTNAMESIZE, sizeof(szFont), szFont);
    2130  +      winhStorePresParam(&ppp, PP_BACKGROUNDCOLOR, sizeof(lColor), &lColor);
    2131  +      WinCreateWindow(...., ppp);
    2132  +      free(ppp);
     2132 *
     2133 +          PPRESPARAMS ppp = NULL;
     2134 +          CHAR szFont[] = "9.WarpSans";
     2135 +          LONG lColor = CLR_WHITE;
     2136 +          winhStorePresParam(&ppp, PP_FONTNAMESIZE, sizeof(szFont), szFont);
     2137 +          winhStorePresParam(&ppp, PP_BACKGROUNDCOLOR, sizeof(lColor), &lColor);
     2138 +          WinCreateWindow(...., ppp);
     2139 +          free(ppp);
    21332140 *
    21342141 *@@added V0.9.0 [umoeller]
     
    24942501 *@@added V0.9.6 (2000-10-16) [umoeller]
    24952502 *@@changed V0.9.7 (2000-12-10) [umoeller]: PROGDETAILS.swpInitial no longer zeroed... this broke VIOs
     2503 *@@changed V0.9.7 (2000-12-17) [umoeller]: PROGDETAILS.pszEnvironment no longer zeroed
    24962504 */
    24972505
     
    25102518    ProgDetails.Length = sizeof(PROGDETAILS);
    25112519    ProgDetails.progt.fbVisible = SHE_VISIBLE;
    2512     ProgDetails.pszEnvironment = 0;
     2520    // ProgDetails.pszEnvironment = 0;
    25132521
    25142522    // memset(&ProgDetails.swpInitial, 0, sizeof(SWP));
     
    31563164 *      SWP structure (*pswpFrame).
    31573165 *
     3166 *      The client window is created with the frame as
     3167 *      its parent and owner and gets an ID of FID_CLIENT.
     3168 *
    31583169 *      Alternatively, you can set pswpFrame to NULL
    31593170 *      and specify FCF_SHELLPOSITION with flFrameCreateFlags.
     
    32153226        {
    32163227            if (pswpFrame)
     3228            {
    32173229                // position frame
    32183230                WinSetWindowPos(hwndFrame,
     
    32243236                                pswpFrame->fl);
    32253237
    3226             // position client
    3227             // WinQueryWindowRect(hwndFrame, &rclClient);
    3228             // doesn't work because it might be invisible V0.9.7 (2000-12-08) [umoeller]
    3229             rclClient.xLeft = 0;
    3230             rclClient.yBottom = 0;
    3231             rclClient.xRight = pswpFrame->cx;
    3232             rclClient.yTop = pswpFrame->cy;
    3233             WinCalcFrameRect(hwndFrame,
    3234                              &rclClient,
    3235                              TRUE);     // calc client from frame
    3236             WinSetWindowPos(*phwndClient,
    3237                             HWND_TOP,
    3238                             rclClient.xLeft,
    3239                             rclClient.yBottom,
    3240                             rclClient.xRight - rclClient.xLeft,
    3241                             rclClient.yTop - rclClient.yBottom,
    3242                             SWP_MOVE | SWP_SIZE | SWP_SHOW);
     3238                // position client
     3239                // WinQueryWindowRect(hwndFrame, &rclClient);
     3240                // doesn't work because it might be invisible V0.9.7 (2000-12-08) [umoeller]
     3241                rclClient.xLeft = 0;
     3242                rclClient.yBottom = 0;
     3243                rclClient.xRight = pswpFrame->cx;
     3244                rclClient.yTop = pswpFrame->cy;
     3245                WinCalcFrameRect(hwndFrame,
     3246                                 &rclClient,
     3247                                 TRUE);     // calc client from frame
     3248                WinSetWindowPos(*phwndClient,
     3249                                HWND_TOP,
     3250                                rclClient.xLeft,
     3251                                rclClient.yBottom,
     3252                                rclClient.xRight - rclClient.xLeft,
     3253                                rclClient.yTop - rclClient.yBottom,
     3254                                SWP_MOVE | SWP_SIZE | SWP_SHOW);
     3255            }
    32433256        }
    32443257    }
     
    35903603    flCmd2 = flCmd | DT_WORDBREAK | DT_TEXTATTRS;
    35913604
    3592     ulCharHeight = gpihQueryLineSpacing(hps, pszText);
     3605    ulCharHeight = gpihQueryLineSpacing(hps);
    35933606
    35943607    while (   (lDrawn)
Note: See TracChangeset for help on using the changeset viewer.