Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!bii!jsl From: jsl@bii.UUCP (jsl) Newsgroups: comp.sys.mac.programmer Subject: How to highlight buttons Keywords: button, mac, macintosh, dialog Message-ID: <288@bii.UUCP> Date: 28 Feb 90 23:20:29 GMT Organization: Bruker Instruments Inc., Billerica MA. Lines: 28 I have been trying to figure out how to highlight the default buttons in a dialog. However I have been unsuccessfull. Can anyone tell me what I am doing wrong. Below is the code segment I am using to do this. Thanks in advance for any help. int ItemHit, ItemType; DialogPtr AcquDLOG; Handle ItemHandle; Rect ItemRect; GrafPtr SavePort; AcquDLOG = GetNewDialog(rParmAcquDLOG, NIL_POINTER, MOVE_TO_FRONT); GetPort(&SavePort); SetPort(AcquDLOG); /* Highlight the default button */ GetDItem (AcquDLOG, iAcquOK, &ItemType, &ItemHandle, &ItemRect); PenSize (3,3); InsetRect(&ItemRect, -4, -4); OffsetRect(&ItemRect, 50, 50); FrameRoundRect(&ItemRect, 16, 16); PenSize (1,1); ====================================================================== Joseph S. Laughlin (508) 667-9739 Sr. NMR Software Specialist jsl@bii.bruker.com ======================================================================