Changeset 1673 for trunk/dll/presparm.c
- Timestamp:
- Dec 30, 2012, 7:51:01 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/dll/presparm.c (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/presparm.c
r1409 r1673 37 37 38 38 #ifdef NEVER 39 /* 39 /** 40 40 * this routine will fill a buffer with all defined window pres params 41 41 * the PRESPARAMS structure returned is suitable to be passed as … … 49 49 if (!tagname || !*tagname || !prof) 50 50 return; 51 / * setup memory access */51 // setup memory access 52 52 ppresparams = (PRESPARAMS *) xmalloc(PP_MAXBUF, pszSrcFile, __LINE__); 53 53 if (!ppresparams) 54 54 return; 55 ppresparams->cb = 0; /* no entries yet */ 56 pparam = ppresparams->aparam; /* cast structure onto memory */ 57 58 /* 59 * query every possible presentation parameter... 60 */ 61 62 /* foreground color -- takes 12 bytes */ 55 ppresparams->cb = 0; // no entries yet 56 pparam = ppresparams->aparam; // cast structure onto memory 57 58 // query every possible presentation parameter... 59 60 // foreground color -- takes 12 bytes 63 61 pparam->cb = WinQueryPresParam(hwnd, 64 62 PP_FOREGROUNDCOLOR, … … 67 65 sizeof(LONG), 68 66 (PVOID) pparam->ab, QPF_NOINHERIT); 69 if (pparam->cb) { /* was the param found? */70 ppresparams->cb += 12; /* used 12 bytes */71 pparam = (PPARAM) (((ULONG) pparam) + 12); / * advance 12 bytes to next memory location */72 } 73 74 / * background color -- takes 12 bytes */67 if (pparam->cb) { // was the param found? 68 ppresparams->cb += 12; // used 12 bytes 69 pparam = (PPARAM) (((ULONG) pparam) + 12); // advance 12 bytes to next memory location 70 } 71 72 // background color -- takes 12 bytes 75 73 pparam->cb = WinQueryPresParam(hwnd, 76 74 PP_BACKGROUNDCOLOR, … … 84 82 } 85 83 86 / * hilited foreground color -- takes 12 bytes */84 // hilited foreground color -- takes 12 bytes 87 85 pparam->cb = WinQueryPresParam(hwnd, 88 86 PP_HILITEFOREGROUNDCOLOR, … … 96 94 } 97 95 98 / * hilited background color -- takes 12 bytes */96 // hilited background color -- takes 12 bytes 99 97 pparam->cb = WinQueryPresParam(hwnd, 100 98 PP_HILITEBACKGROUNDCOLOR, … … 108 106 } 109 107 110 / * disabled foreground color -- takes 12 bytes */108 // disabled foreground color -- takes 12 bytes 111 109 pparam->cb = WinQueryPresParam(hwnd, 112 110 PP_DISABLEDFOREGROUNDCOLOR, … … 120 118 } 121 119 122 / * disabled background color -- takes 12 bytes */120 // disabled background color -- takes 12 bytes 123 121 pparam->cb = WinQueryPresParam(hwnd, 124 122 PP_DISABLEDBACKGROUNDCOLOR, … … 132 130 } 133 131 134 / * border color -- takes 12 bytes */132 // border color -- takes 12 bytes 135 133 pparam->cb = WinQueryPresParam(hwnd, 136 134 PP_BORDERCOLOR, … … 144 142 } 145 143 146 / * font name & size -- maximum 44 bytes (32 for face name, 4 for point size) + 8 for data */144 // font name & size -- maximum 44 bytes (32 for face name, 4 for point size) + 8 for data 147 145 pparam->cb = WinQueryPresParam(hwnd, 148 146 PP_FONTNAMESIZE, … … 155 153 } 156 154 157 / * active color -- takes 12 bytes */155 // active color -- takes 12 bytes 158 156 pparam->cb = WinQueryPresParam(hwnd, 159 157 PP_ACTIVECOLOR, … … 167 165 } 168 166 169 / * inactive color -- takes 12 bytes */167 // inactive color -- takes 12 bytes 170 168 pparam->cb = WinQueryPresParam(hwnd, 171 169 PP_INACTIVECOLOR, … … 179 177 } 180 178 181 / * active text foreground color -- takes 12 bytes */179 // active text foreground color -- takes 12 bytes 182 180 pparam->cb = WinQueryPresParam(hwnd, 183 181 PP_ACTIVETEXTFGNDCOLOR, … … 192 190 } 193 191 194 / * active text background color -- takes 12 bytes */192 // active text background color -- takes 12 bytes 195 193 pparam->cb = WinQueryPresParam(hwnd, 196 194 PP_ACTIVETEXTBGNDCOLOR, … … 205 203 } 206 204 207 / * inactive text foreground color -- takes 12 bytes */205 // inactive text foreground color -- takes 12 bytes 208 206 pparam->cb = WinQueryPresParam(hwnd, 209 207 PP_INACTIVETEXTFGNDCOLOR, … … 218 216 } 219 217 220 / * inactive text background color -- takes 12 bytes */218 // inactive text background color -- takes 12 bytes 221 219 pparam->cb = WinQueryPresParam(hwnd, 222 220 PP_INACTIVETEXTBGNDCOLOR, … … 231 229 } 232 230 233 / * shadow color -- takes 12 bytes */231 // shadow color -- takes 12 bytes 234 232 pparam->cb = WinQueryPresParam(hwnd, 235 233 PP_SHADOW, 0, … … 242 240 } 243 241 244 / * menu foreground color -- takes 12 bytes */242 // menu foreground color -- takes 12 bytes 245 243 pparam->cb = WinQueryPresParam(hwnd, 246 244 PP_MENUFOREGROUNDCOLOR, … … 254 252 } 255 253 256 / * menu background color -- takes 12 bytes */254 // menu background color -- takes 12 bytes 257 255 pparam->cb = WinQueryPresParam(hwnd, 258 256 PP_MENUBACKGROUNDCOLOR, … … 266 264 } 267 265 268 / * menu hilite foreground color -- takes 12 bytes */266 // menu hilite foreground color -- takes 12 bytes 269 267 pparam->cb = WinQueryPresParam(hwnd, 270 268 PP_MENUHILITEFGNDCOLOR, … … 278 276 } 279 277 280 / * menu hilite background color -- takes 12 bytes */278 // menu hilite background color -- takes 12 bytes 281 279 pparam->cb = WinQueryPresParam(hwnd, 282 280 PP_MENUHILITEBGNDCOLOR, … … 290 288 } 291 289 292 / * menu disabled foreground color -- takes 12 bytes */290 // menu disabled foreground color -- takes 12 bytes 293 291 pparam->cb = WinQueryPresParam(hwnd, 294 292 PP_MENUDISABLEDFGNDCOLOR, … … 302 300 } 303 301 304 / * menu disabled background color -- takes 12 bytes */302 // menu disabled background color -- takes 12 bytes 305 303 pparam->cb = WinQueryPresParam(hwnd, 306 304 PP_MENUDISABLEDBGNDCOLOR, … … 325 323 VOID CopyPresParams(HWND target, HWND source) 326 324 { 327 /* 325 /** 328 326 * Copy presentation parameters of interest to us from one window 329 327 * to another
Note:
See TracChangeset
for help on using the changeset viewer.
