We are creating a visual visual linking method for components using a graphical interface in a Visual C ++ (MFC) application. Simple things, such as clicking on fields and drawing lines between related fields and storing information about them. The problem is that we do it all ourselves from scratch in GDI, and it quickly becomes a feature of a lot of support code.
Are we really reinventing the wheel here?
I looked at web pages for components that provide an object-oriented 2D environment (the vector graphics interesting here). Object-oriented in the sense that a square on a screen is a square object in code, or at least that you can store user information on a graphic object. It must support the receipt of information about the positions of the object, etc. In the code to draw lines between objects and determine if the mouse is over the object or not.
Not very complicated things, but it becomes quite complicated and difficult to maintain if there are hundreds or thousands of lines to maintain just because you wrote it all yourself, not to mention the possibility of errors that could have been avoided, which could have been avoid in a mature structure.
Jonas source
share