Changeset 195 for trunk/src/helpers/winh.c
- Timestamp:
- Aug 5, 2002, 8:57:15 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/winh.c
r169 r195 2888 2888 2889 2889 /* 2890 *@@ winhQueryPresColor :2890 *@@ winhQueryPresColor2: 2891 2891 * returns the specified color. This is queried in the 2892 2892 * following order: … … 2966 2966 *@@changed V0.9.0 [umoeller]: added fInherit parameter 2967 2967 *@@changed V0.9.7 (2000-12-02) [umoeller]: added lSysColor == -1 support 2968 */ 2969 2970 LONG winhQueryPresColor(HWND hwnd, // in: window to query 2971 ULONG ulPP, // in: PP_* index 2972 BOOL fInherit, // in: search parent windows too? 2973 LONG lSysColor) // in: SYSCLR_* index or -1 2968 *@@changed V0.9.20 (2002-08-04) [umoeller]: added ulPPIndex, renamed func 2969 */ 2970 2971 LONG winhQueryPresColor2(HWND hwnd, // in: window to query 2972 ULONG ulppRGB, // in: PP_* index for RGB color 2973 ULONG ulppIndex, // in: PP_* index for color _index_ (can be null) 2974 BOOL fInherit, // in: search parent windows too? 2975 LONG lSysColor) // in: SYSCLR_* index or -1 2974 2976 { 2975 2977 ULONG ul, 2976 attrFound, 2977 abValue[32]; 2978 2979 if (ulPP != (ULONG)-1) 2978 attrFound; 2979 LONG lColorFound; 2980 2981 if (ulppRGB != (ULONG)-1) 2982 { 2983 ULONG fl = 0; 2984 if (!fInherit) 2985 fl = QPF_NOINHERIT; 2986 if (ulppIndex) 2987 fl |= QPF_ID2COLORINDEX; // convert indexed color 2 to RGB V0.9.20 (2002-08-04) [umoeller] 2988 2980 2989 if ((ul = WinQueryPresParam(hwnd, 2981 ul PP,2982 0,2990 ulppRGB, 2991 ulppIndex, 2983 2992 &attrFound, 2984 (ULONG)sizeof(abValue), 2985 (PVOID)&abValue, 2986 (fInherit) 2987 ? 0 2988 : QPF_NOINHERIT))) 2989 return (abValue[0]); 2993 sizeof(lColorFound), 2994 &lColorFound, 2995 fl))) 2996 return lColorFound; 2997 } 2990 2998 2991 2999 // not found: get system color 2992 3000 if (lSysColor != -1) 2993 return (WinQuerySysColor(HWND_DESKTOP, lSysColor, 0));3001 return WinQuerySysColor(HWND_DESKTOP, lSysColor, 0); 2994 3002 2995 3003 return -1; 3004 } 3005 3006 /* 3007 *@@ winhQueryPresColor: 3008 * compatibility function because this one was 3009 * exported. 3010 * 3011 *@@added V0.9.20 (2002-08-04) [umoeller] 3012 */ 3013 3014 LONG XWPENTRY winhQueryPresColor(HWND hwnd, 3015 ULONG ulPP, 3016 BOOL fInherit, 3017 LONG lSysColor) 3018 { 3019 return winhQueryPresColor2(hwnd, 3020 ulPP, 3021 0, 3022 fInherit, 3023 lSysColor); 2996 3024 } 2997 3025 … … 3339 3367 VOID winhSleep(ULONG ulSleep) // in: sleep time in milliseconds 3340 3368 { 3341 HWND hwnd; 3369 HWND hwnd; 3370 3342 3371 if (hwnd = winhCreateObjectWindow(WC_STATIC, NULL)) 3343 3372 { 3344 QMSG qmsg; 3345 HAB hab = WinQueryAnchorBlock(hwnd); 3346 if (WinStartTimer(hab, 3347 hwnd, 3348 1, 3349 ulSleep)) 3373 QMSG qmsg; 3374 HAB hab; 3375 3376 if ( (hab = WinQueryAnchorBlock(hwnd)) 3377 && (WinStartTimer(hab, 3378 hwnd, 3379 1, 3380 ulSleep)) 3381 ) 3350 3382 { 3351 3383 while (WinGetMsg(hab, &qmsg, NULLHANDLE, 0, 0))
Note:
See TracChangeset
for help on using the changeset viewer.