![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
windows forms: drawing rectangles, creating regions and invalidatingHi
I'm writing a program using visual C++.NET that lets users create boxes, drag them around a link them. I'm new to the gui world and am having lots of syntax errors using .net. So far, i've created a picturebox and everytime the user choses to add a box, a rectangle is drawn. I track the rectangles movements using mouse events and invalidate to re-draw the screen. The problem is when there are 2 or more boxes on the screen i only want to invalidate the "clean" region. So i thought id create a region comprising of the picturebox and exclude rectangles as they're created.. so when i cal invalidate only the clean area is re-drawn. But i can't seem to create a region: Region R = Region(pictureBox): or even Region R = Region(a); ...where a is a rectangle. I'd really really appreciate any assistance i can get. Much thank Aileen =O) |
|
#2
|
||||
|
||||
|
Quote:
You need to create a new instance of the Region. CPP / C++ / C Code:
You can't do anything with the first version though, because pictureBox is just a control...or is it? Well, that's what the name suggests, anyway... Regards, Luci __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein Last edited by LuciWiz : 10-Sep-2004 at 09:31.
|
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The