Framing a window - Not at creation [modified]
-
Hey, Okay, bear with me. I'm not sure if what I want to do is called "framing" but that is what I will refer to it as. Most windows in Microsoft Windows have a frame, the frame (usually) has three buttons, minimize, maximize/restore down and exit. If you click 'restore down' the window has a complete frame and can be moved by dragging the mouse. I want to be able to create a frame around a window that I resize, please note that I need to do this from a dll that I inject into a process; my code doesn't create the original window. Below is an image of what I want to do, I really hope you understand ;P http://img389.imageshack.us/my.php?image=frameui4.png[^] I'd really appreciate some help with this, I can't seem to get it working :\ Thanks for your time :)
modified on Thursday, October 16, 2008 4:56 AM
-
Hey, Okay, bear with me. I'm not sure if what I want to do is called "framing" but that is what I will refer to it as. Most windows in Microsoft Windows have a frame, the frame (usually) has three buttons, minimize, maximize/restore down and exit. If you click 'restore down' the window has a complete frame and can be moved by dragging the mouse. I want to be able to create a frame around a window that I resize, please note that I need to do this from a dll that I inject into a process; my code doesn't create the original window. Below is an image of what I want to do, I really hope you understand ;P http://img389.imageshack.us/my.php?image=frameui4.png[^] I'd really appreciate some help with this, I can't seem to get it working :\ Thanks for your time :)
modified on Thursday, October 16, 2008 4:56 AM
Maybe you could use SetWindowsLong + SetWindowPos (with SWP_FRAMECHANGED flag enabled). Look: SWP_FRAMECHANGED Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed. http://msdn.microsoft.com/en-us/library/ms633545.aspx