[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to get the window hilite color?
- To: firstname.lastname@example.org
- Subject: How to get the window hilite color?
- From: Repenning Alexander <email@example.com>
- Date: Sun, 11 Oct 92 17:26:06 MDT
I'm trying to get the hilite color of a window. One would think
this should be a pretty trivial task but I'm goin insane..
One (of many) ideas I had was to use the GetAuxWin trap:
I create a color window
(setq w (make-instance 'window :color-p t))
.. no problem, and then I call the trap
(%stack-block ((ColorH-VAR 4))
(#_getauxwin (wptr w) ColorH-VAR)
(rref (%get-ptr ColorH-VAR) :auxwinrec.awctable))))
=> (NIL #<A Mac Handle to resource 'wctb'(0) : Unlocked, Size 112 #xBBA4>)
The nil indicates that the window has no auxiliary record. The
handle returned, therefore, points to the default record.
However, if I use the inspector I can find my way though the hilite
color which is different from the one returned by _getauxwin.
Unfortunately, I'm not able to get the value returned by the inspector
(rref (wptr w) :cwindowrecord.port)
> Error: Illegal attempt to get a pointer to a :RGBCOLOR within a handle
> While executing: CCL::EXPAND-HANDLE-RECORD-GET
So, how can I access the hilite color of a window? Any ideas?
puzzled, Alex Repenning