Author | Message | Time |
---|---|---|
inner. | Is there any possible way to outline rtb, listviews, and textboxes without using lines or textboxes? | January 17, 2005, 9:59 PM |
Zakath | What do you mean by "outline?" You mean you want to mess with the border around the control? | January 17, 2005, 10:03 PM |
inner. | I forgot to add into that, I took away the border of them. So it is borderless, im trying to outline them with a black border instead of it's normal border. | January 17, 2005, 10:07 PM |
Yegg | You could try using line controls. | January 17, 2005, 10:45 PM |
Networks | [quote author=Yegg link=topic=10221.msg95551#msg95551 date=1106001923] You could try using line controls. [/quote] He doesn't want to do that. I suggested to him to use some sort of API because I know it's out there, I just didn't know which declares and functions. So if someone could provide that, that'd be just dandy ^^. | January 17, 2005, 10:56 PM |
OnlyMeat | [quote author=inner. link=topic=10221.msg95543#msg95543 date=1105999167] Is there any possible way to outline rtb, listviews, and textboxes without using lines or textboxes? [/quote] As far as i know ( if you are using vb ) it has a border property which allows you to set the style etc. If that fails you could always use the win32 GDI functions CreateRectRgn and FrameRgn. It would probably go something like this ( note i haven't tested this code so dont take it as plugin and work, also you need to add error checking on the return values of the GDI functions as they can fail! ) [code] // Create the rectangle region HRGN hRgn = ::CreateRectRgn(10,10,10,10); // insert appropriate rectangular dimensions. // Create the brush object HBRUSH hBrush = ::CreateSolidBrush(RGB(0,0,0)); black as requested ( this will by default have a line thickness of 1 pixel. // Now draw the rectangular border // Assumes you have a reference to your window's/controls device context handle (hDC) ::FrameRgn(hDC,hRgn,hBrush,10,10); // insert approriate width/height arguments ( the last 2 ) // Now cleanup GDI objects ::DeleteObject(hRgn); ::DeleteObject(hBrush); [/code] Thats in raw API format but using MFC or something can make it much more simplistic. | January 19, 2005, 12:45 AM |