Changeset 18 for trunk/src/helpers/winh.c
- Timestamp:
- Jan 1, 2001, 4:30:29 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/winh.c
r17 r18 1608 1608 * area and will adjust coordinates accordingly. This can 1609 1609 * happen when changing video resolutions. 1610 * 1611 *@@changed V0.9.7 (2000-12-20) [umoeller]: fixed invalid params if INI key not found 1610 1612 */ 1611 1613 … … 1617 1619 { 1618 1620 BOOL brc = FALSE; 1619 SWP swp , swpNow;1621 SWP swp; 1620 1622 ULONG cbswp = sizeof(swp); 1621 ULONG fl2 = fl;1623 ULONG fl2 = (fl & ~SWP_ZORDER); 1622 1624 1623 1625 if (PrfQueryProfileData(hIni, pszApp, pszKey, &swp, &cbswp)) … … 1631 1633 { 1632 1634 // if no resize, we need to get the current position 1635 SWP swpNow; 1633 1636 brc = WinQueryWindowPos(hwnd, &swpNow); 1634 1637 swp.cx = swpNow.cx; … … 1649 1652 } 1650 1653 else 1654 { 1651 1655 // window pos not found in INI: unset SWP_MOVE etc. 1656 WinQueryWindowPos(hwnd, &swp); 1652 1657 fl2 &= ~(SWP_MOVE | SWP_SIZE); 1658 } 1653 1659 1654 1660 WinSetWindowPos(hwnd, … … 2124 2130 * 2125 2131 * 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); 2133 2140 * 2134 2141 *@@added V0.9.0 [umoeller] … … 2494 2501 *@@added V0.9.6 (2000-10-16) [umoeller] 2495 2502 *@@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 2496 2504 */ 2497 2505 … … 2510 2518 ProgDetails.Length = sizeof(PROGDETAILS); 2511 2519 ProgDetails.progt.fbVisible = SHE_VISIBLE; 2512 ProgDetails.pszEnvironment = 0;2520 // ProgDetails.pszEnvironment = 0; 2513 2521 2514 2522 // memset(&ProgDetails.swpInitial, 0, sizeof(SWP)); … … 3156 3164 * SWP structure (*pswpFrame). 3157 3165 * 3166 * The client window is created with the frame as 3167 * its parent and owner and gets an ID of FID_CLIENT. 3168 * 3158 3169 * Alternatively, you can set pswpFrame to NULL 3159 3170 * and specify FCF_SHELLPOSITION with flFrameCreateFlags. … … 3215 3226 { 3216 3227 if (pswpFrame) 3228 { 3217 3229 // position frame 3218 3230 WinSetWindowPos(hwndFrame, … … 3224 3236 pswpFrame->fl); 3225 3237 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 } 3243 3256 } 3244 3257 } … … 3590 3603 flCmd2 = flCmd | DT_WORDBREAK | DT_TEXTATTRS; 3591 3604 3592 ulCharHeight = gpihQueryLineSpacing(hps , pszText);3605 ulCharHeight = gpihQueryLineSpacing(hps); 3593 3606 3594 3607 while ( (lDrawn)
Note:
See TracChangeset
for help on using the changeset viewer.