Changeset 69 for trunk/src/helpers/winh.c
- Timestamp:
- May 19, 2001, 3:47:20 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/winh.c
r62 r69 57 57 #define INCL_WINPROGRAMLIST 58 58 #define INCL_WINSWITCHLIST 59 #define INCL_WINBUTTONS 59 60 #define INCL_WINMENUS 60 61 #define INCL_WINSCROLLBARS … … 88 89 89 90 /* 91 *@@category: Helpers\PM helpers\Wrappers 92 */ 93 94 /* ****************************************************************** 95 * 96 * Wrappers 97 * 98 ********************************************************************/ 99 100 #ifdef WINH_STANDARDWRAPPERS 101 102 /* 103 *@@ winhSendMsg: 104 * wrapper for WinSendMsg. 105 * 106 * If WINH_STANDARDWRAPPERS is #defined before 107 * including win.h, all WinSendMsg calls are 108 * redefined to use this wrapper instead. This 109 * reduces the amount of external fixups required 110 * for loading the module. 111 * 112 *@@added V0.9.12 (2001-05-18) [umoeller] 113 */ 114 115 MRESULT winhSendMsg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 116 { 117 // put the call in brackets so the macro won't apply here 118 return ((WinSendMsg)(hwnd, msg, mp1, mp2)); 119 } 120 121 /* 122 *@@ winhPostMsg: 123 * wrapper for WinPostMsg. 124 * 125 * If WINH_STANDARDWRAPPERS is #defined before 126 * including win.h, all WinSendMsg calls are 127 * redefined to use this wrapper instead. This 128 * reduces the amount of external fixups required 129 * for loading the module. 130 * 131 *@@added V0.9.12 (2001-05-18) [umoeller] 132 */ 133 134 BOOL winhPostMsg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 135 { 136 // put the call in brackets so the macro won't apply here 137 return ((WinPostMsg)(hwnd, msg, mp1, mp2)); 138 } 139 140 /* 141 *@@ winhWindowFromID: 142 * 143 *@@added V0.9.12 (2001-05-18) [umoeller] 144 */ 145 146 HWND winhWindowFromID(HWND hwnd, ULONG id) 147 { 148 // put the call in brackets so the macro won't apply here 149 return ((WinWindowFromID)(hwnd, id)); 150 } 151 152 /* 153 *@@ winhQueryWindow: 154 * 155 *@@added V0.9.12 (2001-05-18) [umoeller] 156 */ 157 158 HWND winhQueryWindow(HWND hwnd, LONG lCode) 159 { 160 // put the call in brackets so the macro won't apply here 161 return ((WinQueryWindow)(hwnd, lCode)); 162 } 163 164 #endif // WINH_STANDARDWRAPPERS 165 166 /* 90 167 *@@category: Helpers\PM helpers\Rectangle helpers 91 168 */ … … 119 196 120 197 /* 198 *@@category: Helpers\PM helpers\Generics 199 */ 200 201 /* ****************************************************************** 202 * 203 * Generics 204 * 205 ********************************************************************/ 206 207 /* 208 *@@ winhSetDlgItemChecked: 209 * checks a check box. 210 * 211 * This has been turned into a real function 212 * because this is used hundreds of times in 213 * XWP, and each WinSendDlgItemMsg in each 214 * macro produced a fixup relocation record. 215 * 216 *@@added V0.9.12 (2001-05-18) [umoeller] 217 */ 218 219 BOOL winhSetDlgItemChecked(HWND hwnd, // in: dialog 220 SHORT id, // in: dialog item ID 221 SHORT bCheck) // in: 0, 1, or (for tri-state) 2 222 { 223 return ((BOOL)WinSendDlgItemMsg(hwnd, 224 id, 225 BM_SETCHECK, 226 MPFROMSHORT(bCheck), 227 MPNULL)); 228 } 229 230 /* 231 *@@ winhIsDlgItemChecked: 232 * returns the current check state of the 233 * specified check box, which can be 0, 1, 234 * or (for tri-state checkboxes) 2. 235 * 236 *@@added V0.9.12 (2001-05-18) [umoeller] 237 */ 238 239 SHORT winhIsDlgItemChecked(HWND hwnd, // in: dialog 240 SHORT id) // in: dialog item ID 241 { 242 return (SHORT1FROMMR(WinSendDlgItemMsg(hwnd, 243 id, 244 BM_QUERYCHECK, 245 MPNULL, 246 MPNULL))); 247 } 248 249 /* 250 *@@ winhEnableDlgItem: 251 * 252 *@@added V0.9.12 (2001-05-18) [umoeller] 253 */ 254 255 BOOL winhEnableDlgItem(HWND hwndDlg, 256 SHORT id, 257 BOOL fEnable) 258 { 259 return (WinEnableWindow(WinWindowFromID(hwndDlg, id), fEnable)); 260 } 261 262 /* 263 *@@ winhIsDlgItemEnabled: 264 * 265 *@@added V0.9.12 (2001-05-18) [umoeller] 266 */ 267 268 BOOL winhIsDlgItemEnabled(HWND hwndDlg, 269 SHORT id) 270 { 271 return (WinIsWindowEnabled(WinWindowFromID(hwndDlg, id))); 272 } 273 274 275 /* 121 276 *@@category: Helpers\PM helpers\Menu helpers 122 277 */ … … 127 282 * 128 283 ********************************************************************/ 284 285 /* 286 *@@ winhQueryMenuItem: 287 * wrapper around MM_QUERYITEM. 288 * 289 *@@added V0.9.12 (2001-05-18) [umoeller] 290 */ 291 292 BOOL winhQueryMenuItem(HWND hwndMenu, 293 USHORT usItemID, 294 BOOL fSearchSubmenus, 295 PMENUITEM pmi) // out: MENUITEM data 296 { 297 return ((BOOL)WinSendMsg(hwndMenu, 298 MM_QUERYITEM, 299 MPFROM2SHORT(usItemID, fSearchSubmenus), 300 (MPARAM)pmi)); 301 } 129 302 130 303 /* … … 1525 1698 // which considers this inclusive! 1526 1699 LONG ulViewportPels, // in: total viewport dimension, 1527 // into which *p lCurPelsOfs is an offset1700 // into which *pulCurPelsOfs is an offset 1528 1701 USHORT usLineStepPels, // in: pixels to scroll line-wise 1529 1702 // (scroll bar buttons pressed) … … 1602 1775 if (*pulCurPelsOfs > (lMaxAllowedUnitOfs * usScrollUnitPels)) 1603 1776 { 1604 // _Pmpf((" !!! limiting 2: %d to %d", *plCurUnitOfs, lMaxAllowedUnitOfs));1605 1777 *pulCurPelsOfs = (lMaxAllowedUnitOfs * usScrollUnitPels); 1606 1778 }
Note:
See TracChangeset
for help on using the changeset viewer.