   [DX9/MSVC] UI/Dialog Borders & Boxes
  I have no clue what to call this really, and after tones of searching I'm still none the wiser as to how to do this.basically what I'm looking for is a way to create borders for tooltips, dialogs and other UI elements, that can be of (almost) any  variable size. for example the gold border around the (dota) scoreboard in WC3(not my screenshot, as I don't own WC3): http://i287.photobucket.com/albums/ll147/Foede2/scoreboard-1.jpgI have tried creating an image, representing a square, that is scaled/streached to the desired size, but it comes out terribly, which I kinda expected. the above however seems to be a 'tiled' sort of border, 4 pieces for each corner, and 4 that are repeated to create the sides.so my questions are:1) what is the best way to do this?2) would the same method apply if say the border was a pattern that was repeated?3) and would the method still allow me to place the textures used for the borders in the same atlas I'm currently using for all my other UI elements?   
  Hello :)In the system I have in my game engine the borders are indeed tiled (backgrounds can be too).You draw 4 corners and then you tile the 4 sides all over.These are also saved in a sprite sheet form although you can save them individually too. You are using an atlas so it's pretty much the same as sheet form, so yes, you can.So for your questions:1) I don't know if it is the best way, but it works great for me: Tiling.I can stretch my menus to any size and they still look great thanks to that :)2) Yes, but if you stretch it, the sides will keep being repeated the bigger you stretch it.3) Yes. :)Edit:I don't know about Warcraft 3 but I do know that World of Warcraft is enabling a tiling system at least for the *customized GUI*, for the non-customized GUI I believe they are using a constant size with a particular texture for every size needed and then just render it in the right size, so they avoid stretching.So as you can see, Blizzard have both methods, it's the decision of when to use which :)   ;  For 3): if the pattern stretches all along the texture:.,|-.,-..,|-,-..-.|-.,-,..|-.,-.Anyway, I don't know a better method than do use 8 quads (or 9, if the background has to be filled).   