Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does windows let you draw on the whole screen?

I've been playing a big with the DC obtained with CreateDC(L"DISPLAY",NULL,NULL,NULL) and I've been wondering why does windows let you draw on the whole screen that easily, cause I think you could do some pretty evil stuff with that like putting a TIMER at 1ms and drawing a black rectangle on the whole screen every time the timer ticks.

like image 738
Razvi Avatar asked Jul 16 '09 12:07

Razvi


People also ask

How do I draw on screen in Windows 10?

Select Windows Ink Workspace from the taskbar to open it. From here, you can select Whiteboard or Fullscreen Snip. (You can also select More and Learn more about pen or access Pen settings .) Tip: Press the top button on your pen once to quickly open Microsoft Whiteboard, or double-press it to open Snip & Sketch.

How do you draw on Windows?

Head to the sketchpad or screen sketch within the Windows Ink Workspace and click on the ruler icon in the upper right-hand corner of the toolbar. Then, adjust the digital ruler and with your pen (or finger, if you click on the “touch writing” icon) to draw sharp lines along the edge.


1 Answers

The fact that you could do some pretty evil stuff doesn't mean windows shouldn't let you do it. Just think of all the other evil things you could do:

  • Run in an infinite loop and eat up all the cpu time.
  • Write random bits to a file until you fill up the whole hard disk.
  • Delete random files all over the place.
  • Allocate memory like crazy until the computer slows to a crawl.

Just because you CAN do those things doesn't mean windows should prevent you from writing to the hard drive or allocating memory or deleting files.

The purpose of Windows is to provide an environment in which programs can run. The more flexible they make that environment, the more interesting (and, unfortunately, devious) programs it makes possible for developers to create.

If they started putting in arbitrary restrictions on what you can do because you might abuse it... well, then it wouldn't be windows, it would be an iPhone :)

like image 65
Eric Petroelje Avatar answered Sep 21 '22 04:09

Eric Petroelje