-2

This question is a result of a discussion. I was wondering if a window that is created via WinAPI can behave like explorer windows e.g. can be controlled by the Windows and the arrow keys. (if you press Windows + ArrowKey the focused window should move and snap in that direction on the side).

Is it possible to tell that a window should behave like this or would one have to handle such control commands by himself?

Stefan Falk
  • 23,898
  • 50
  • 191
  • 378
  • 1
    What did your CreateWindowEx experiment show? – Captain Giraffe Dec 23 '13 at 00:28
  • It's not possible to *tell* a window to implement standard behavior. It simply does. It is possible to change that behavior, though. – IInspectable Dec 23 '13 at 00:31
  • The shell treats every toplevel window with a sizable border this way. It is not implemented by the window itself. – Hans Passant Dec 23 '13 at 00:51
  • 1
    Your question is answered in [Handling AeroSnap message in WndProc](http://stackoverflow.com/questions/9321549/handling-aerosnap-message-in-wndproc), found through "winapi aero snap". :-) – CodeCaster Dec 23 '13 at 01:02

1 Answers1

1

All "standard" behavior is provided by DefWindowProc. As long as you pass all unhandled messages to DefWindowProc, you'll get it.

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720