
-----------------------------------
HRI
Thu Jun 02, 2011 6:36 pm

Paint Program that Works Anywhere
-----------------------------------
I've started developing a nifty little tool (great for class) for Windows that lets you paint on the screen anywhere you want. Note that I do plan to build on it and make use of the window (yes, it's in there for future use really).



#define _WIN32_WINNT 0x0500 // used for GetConsoleWindow()
#include  // used for all windows functions
#include  // used for cin and cout
#include  // used for system
using std::cout;
using std::cin;

HWND cmd = GetConsoleWindow(); // get handle to console window
HWND hwnd; // handle for window

const char g_szClassName

It should compile and run fine, but as of a couple hours ago, the computer doesn't seem to want to compile anything...
Also, a small note: There is no way to quit this program in a user-friendly manner. That means either log off, shut down, or type taskkill /f /im .exe into command prompt.

If you notice anything that could be written better (as in codewise, not programming practices, I know it's all messy), feel free to share.
A final note, if you know of a way to make it not use all the CPU it can, I'd be happy to hear.

Suggestions on future additions, ideas on fixing existing code, and constructive criticism are appreciated!

FUTURE UPDATE IDEAS:
-a palette of colours rather than entering RGB (or even a few sliders and a sample)
-ability to make a white rectangle as a canvas
-storing the screen so I can redraw it when the console window is gone or something updates (ideas on that would be nice)
-ability to trap (or release) the cursor within the latest canvas created
-when I get the dang hook working, ability to scroll for size adjustment
-different shapes, lines etc
-an interface for all this stuff with a hotkey (probably where that window could be nice)
-umm...nuke the annoying circles and make an actual path? (working on this next I hope, main idea I have is storing old coordinates and drawing some circles along the way, but I don't know how that's going to work when they make curves)
-figuring out how to get it to not continue to move stuff (i.e. there's no more selection box on the desktop because it drags from the bottom right now, but you can still move icons around)
-oh! an exit button or something would be great :p

EDIT: really bad to forget this: [url=http://winprog.org/tutorial]Great site for learning beginning Windows API programming, exactly where I stole a version of the window from since it takes so long to write it out.

-----------------------------------
Velocity
Mon Jan 16, 2012 9:38 am

RE:Paint Program that Works Anywhere
-----------------------------------
nice game, works perfectly.
