Enable the dialog item with the given index */
| 270 | |
| 271 | /* Enable the dialog item with the given index */ |
| 272 | static void |
| 273 | ask_enable(DialogRef wind, short item, int enable) |
| 274 | { |
| 275 | short type; |
| 276 | Handle handle; |
| 277 | Rect rect; |
| 278 | |
| 279 | /* Enable or disable the appropriate item */ |
| 280 | GetDialogItem(wind, item, &type, &handle, &rect); |
| 281 | if (enable) |
| 282 | type &= ~itemDisable; |
| 283 | else |
| 284 | type |= itemDisable; |
| 285 | HiliteControl((ControlHandle) handle, enable ? 0 : 255); |
| 286 | SetDialogItem(wind, item, type, handle, &rect); |
| 287 | return; |
| 288 | } |
| 289 | |
| 290 | static pascal void |
| 291 | ask_redraw(DialogRef wind, DialogItemIndex item) |