   Moving a maximized window
  I'm currently developing a small application that allows you to drag windows into different areas of the screen, and thus become maximized (to simplify restoring of windows). However, I still like to retain the default behaviour of a window that consumes the entire screen (with or without borders showing)...However here Windows step in and mess up, I currently see two solutions, either try to make full screen maximized windows moveable, OR have the window show it's border when maximized (partially maximized windows are moveable)...But Windows prevents both... first off, full screen maximized windows cannot be moved by default, WM_NCHITTEST does not appear to be the problem either...The second solution is trashed by the fact, that by default you cannot have windows that are the size of the workarea... they are automatically padded to put the borders outside the screen. That is, if your work area is 100x100... and you make a window 100x100 maximized, Windows make it 108x108 (-4,-4). (Making it 100x99 doesn't cause this)I've searched some and haven't found a solution to this... both solutions are viable in my eyes... does anyone have any clue on how to bypass either of these behaviours? (Or to accomplish something similar to what I mean)[Edited by - Syranide on July 23, 2006 9:55:24 AM]
  you can kinda fake it by overriding WM_SYSCOMMAND's SC_MAXIMIZE. when a window is about to become maximized, WM_SYSCOMMAND is sent with SC_MAXIMIZE, instead of letting it do the default, size the window yourself with SetWindowPos to take up the whole screen. the window won't truly be maximized, but it will be moveable and have the borders.Y-Go   