Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Framing a window - Not at creation [modified]

Framing a window - Not at creation [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
phphelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    urbanyoung
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • U urbanyoung

      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

      J Offline
      J Offline
      Jose David Pujo
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups