I am trying to do some hello world stuff after completing the standard c++ tutorial. The first thing I tried doing is drawing directly on the screen without a window. I found this and it works.
#include "stdafx.h"
#include <Windows.h>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
HDC screenDC = ::GetDC(0);
::Rectangle(screenDC, 200, 200, 300, 300);
int exit; cin >> exit;
return 0;
}
But nowhere in the standard c++ tutorial does it cover anything like this
HDC screenDC = ::GetDC(0);
::Rectangle(screenDC, 800, 200, 300, 300);
What is Rectangle a member of?
If you don't mind I have some other questions that might be simple. If not don't worry about it.
As soon as my rectangle has a window move over it, it disappears. Is there a callback to let me know about this so I can repaint?
How do I change the color of my rectangle?
Where can I go to learn about this? Every tutorial I have found has been sparse and most have been out of date. I can get a book if that's what I need to do. Have tried the following (sometimes with success and sometimes not):
http://msdn.microsoft.com/en-us/library/vstudio/bb384843.aspx
http://msdn.microsoft.com/en-us/library/ms533895(v=vs.85).aspx