i am new, i just start to learn draw shape with vs2012 c++ and Gdiplus about 5 weeks, i create a simple project to test, but when i draw polygon finish, i cannot delete any polygon which i selected from canvas, it not so easy like to delete a rectangle or a ellipse, only delete the parameter in CArray, but the canvas still can find the "polygon", like my project result show...
i put my project here :
it can be work, i need someone to help me or teach me the "key point".
Q1 : how do i to identify the background memory area, or show memory area when i use double buffer to draw shape, i use bitblt , it not very good to show the draw result?
Q2 : how do i to use "Object Oriented Programming" idea, to rewrite my test code and let it become more easy to read or easy to add any new item, for example : read some books or some information !
Q3 : i am interest in code programming, what basic books or knowledge i need to know, if i wish to become a good "coder".
or if you have any idea, it is ok~~~
how to use my project :
1. open the project, and start to run.
2. select draw mode or delete mode.
3. when user select draw rectangle : use mouse left button and keep it down, start to draw, and it can resize.
4. when select draw polygon : use mouse left button and move mouse, start to draw, and user select next point you want, it will auto connect the last point to the new point, if you want to close, please use mouse right button and click once.
5. when user select delete : use mouse select any shape you draw, and click the shape topleft or bottomright, messagebox will show, if you select "ok", the shape will redraw by pen notxorpen mode.
What I have tried:
i try to find so much title or answer from book and web side, but those are not very clear i thought, i try to write code to test and find how it get answer or what happen when i go different way to test the gdiplus, i do not very understand how the code to programming, like : double buffer to draw shape, use the "Object Oriented Programming" to create a new full project, or how to become more easy to read or test other people's thought. i know it not a short time to get the right way, i just want to get more basic knowledge to study.