CompuServe Thread

#gGadgets

4 messages in this thread
#35226From: Steven ParkJun 9, 1993 10:07 PM
Could someone give me a simple example of how to use DrawBevelBox() please. Thanks.
#35237From: Michael McCormickJun 10, 1993 12:31 AM
Steven, Here is a small function I have that uses the function DrawBevelBox(), Hope this will be enough of a example. void RenderFilledBox(struct Window *w, UBYTE apen, WORD left, WORD top ,WORD width, WORD height, UBYTE look, ULONG type) { SetAPen(w->RPort, apen ); if (raised == look ) { DrawBevelBox(w->RPort, left, top, width, height, GTBB_FrameType, type, GT_VisualInfo, VisualInfo, TAG_DONE ); } else if ( lowered == look ) { DrawBevelBox(w->RPort, left, top, width, height, GTBB_Recessed,TRUE, GTBB_FrameType,type,GT_VisualInfo,VisualInfo,TAG_DONE ); } SetAfPt(w->RPort, NULL, 0 ); SetAPen(w->RPort, apen ); RectFill(w->RPort, left + 2, top + 1, left + width – 3,top + height – 2 ); } P.S. I use a enum for the lowered or raised and declare it in my globals.h file. enum look { raised, lowered }; MikeM:) "Amiga means never having to say you're sorry!"
#35244From: Steven ParkJun 10, 1993 9:24 AM
Thanks a lot for your response, will let you know how it works out (I'll read it off line as this is long distance. Thanks again./exit
#35250From: Steve AhlstromJun 10, 1993 1:17 PM
Steven, typedef struct box { int x; int y; int w; int h; } BOX, *BOX_PTR; BOX ebox = { 4, 0, 615, 348 }; DrawBevelBox(editor_window->RPort, ebox.x, ebox.y, ebox.w, ebox.h, GT_VisualInfo, vi, TAG_DONE); -sja