MFC building "Paint" alike application
I realize that MFC makes it possible to build up the software, which exactly resemble Paint on Windows, so let me explain how to expand own your Paint alike application in this article.
These following enviroments are on what i verified a successful debugging and execution.
- Visual Studio 2022 Community
- MFC Dialog
- C++
01; Add Windows-Message functions
To handle movement of mouse, these 4 functions are prerequisites:
you can add from above menus;
- OnPaint()
- OnMouseMove()
- OnLButtonDown()
- OnLButtonUp()
02; The flowchart
To make it clear how processes go on, here's flowchart.
03; Programs
Since the entire programs are too long, i only extracate important parts.