   how to make rounded rectangle in direct x 8???
  In old DirectX 7 there was a rounded rectangle function within direct draw. How do I do this same objective with in DirectX 8 or 9? Need help ASAP. 
  The easiest way would be to use GDI onto the screen. Here's a GDI line function:void DrawLine(int x,int y,int x2,int y2, COLORREF color) {HDC hdc;   IDirect3DSurface9 *backbuffer;   device->GetBackBuffer(0,0,D3DBACKBUFFER_TYPE_MONO,&backbuffer);backbuffer->GetDC(&hdc);HPEN hpen = (HPEN)SelectObject(hdc,CreatePen(PS_SOLID,0,color));MoveToEx(hdc,x,y,NULL);LineTo(hdc,x2,y2);DeleteObject(SelectObject(hdc,hpen));backbuffer->ReleaseDC(hdc);backbuffer->Release();}    The code assumes there's a variable named 'device' for your IDirect3DDevice9 as a global variable, or if you put it in a class, a variable in the class. If I didn't forget something, it should work, though slowly.Or you could draw the rounded rectangle in Paint, save it to a picture, and draw the picture onto the screen. That would probably be alot faster.[edited by - mike29936 on May 26, 2004 8:00:09 AM] [edited by - mike29936 on May 26, 2004 8:00:52 AM];  Ok, can I do something similar to this?http://myhtpc.net/images/screens/large/music1.jpgI am writing a touch screen app that needs a nice button look, like those, including the beveled effect. I would just create a image and use the image as a button I need to be able to resize the button, as the end user will be able to add custom text to the buttons, and I don''t wont the text getting outside the button. How would I go about doing this? ;  It looks like you need alpha transparency for the buttons, so you should create a picture with alpha transparency, load it, and scale it to the needed size. For the text, I believe ID3DXFont can limit text to a rectangle, but I just noticed you said in DirectX 8, and I''ve only used DirectX 9, so I don''t know whether ID3DXFont is in DX8.However, if the GDI-to-backbuffer I showed you as the first solution works, then you should be able to use GDI to draw text, and I''m very sure that GDI can limit text to a rectangle.And you could always create a custom text-drawer if you need something more. ;  Using GDI may be the easiest way, but it isn't the fastest way.  In fact, GDI is horribly slow.  If you aren't concerned with speed *at all*, then you can use GDI.  However, if it is a factor, use the method that Mike presented.  It looks better, too, since you can customize the button's appearance with an image editor.ID3DXFont was available in DX8, but it was incredibly slow, since it actually used GDI.  Therefore, it'd probably be better just to use GDI in the first place   Make no mistake though: in DX9, ID3DXFont is fully 3D (ie no GDI), and is quite fast. Dustin Franklin    Mircrosoft DirectX MVP   [edited by - circlesoft on May 26, 2004 5:28:46 PM];  Ok, bare with me here. Not that strong with DX, trying my best to get there though. How would I scale an image if I do go that route? And does the DX font class have a way of telling me what the width is of the drawn text? So that I know how much to scale the image.And I'm assuming that if I create a white button, that some how I can overlay a different color over top of it to change it's color on the fly?What all ref and lib do I need to point to for GDI?   [edited by - GotzBoost on May 26, 2004 5:37:04 PM];  Bueller.... Bueller.... Bueller.... Bueller.... Has anyone seen Ferris....Hello? Any help? ;  Did I loose everyone here? Taken off early for the weekend or soemthing? ;  The rounded rect in that image(music1.jpg) is made using a sprite that looks like a rounded rect(using a colorkey/alphachannel).Also the best way of doing it./MindWipe   ;  Could you give me an example? 