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. CascadeWindows and TileWindows

CascadeWindows and TileWindows

Scheduled Pinned Locked Moved C / C++ / MFC
designhelptutorialquestionlearning
3 Posts 3 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.
  • N Offline
    N Offline
    nilaysoft
    wrote on last edited by
    #1

    Hi, friends, I create more than one windows (different instance but belongs to the same window class) on desktop, and want to manage them by "Cascade", "Tile Horizontally" and "Tile Vertically" commands. Of course the first idea is using window SDK functions: CascadeWindows(...), TileWindows(...). The problem arise however, The two functions will restore all other windows on desktop, which is not a good design of course. The solution is to write my own CascadeWindows and TileWindows subroutines. But I don't know how to do it. any idea? Thanks! wuwu

    P P 2 Replies Last reply
    0
    • N nilaysoft

      Hi, friends, I create more than one windows (different instance but belongs to the same window class) on desktop, and want to manage them by "Cascade", "Tile Horizontally" and "Tile Vertically" commands. Of course the first idea is using window SDK functions: CascadeWindows(...), TileWindows(...). The problem arise however, The two functions will restore all other windows on desktop, which is not a good design of course. The solution is to write my own CascadeWindows and TileWindows subroutines. But I don't know how to do it. any idea? Thanks! wuwu

      P Offline
      P Offline
      Paul M Watt
      wrote on last edited by
      #2

      If you look at the definition for CascadeWindows:

      WORD CascadeWindows(
      HWND hwndParent, // handle to parent window
      UINT wHow, // types of windows not to arrange
      CONST RECT *lpRect, // rectangle to arrange windows in
      UINT cKids, // number of windows to arrange
      const HWND *lpKids // array of window handles
      );

      lpKids is an array that allows you to specify only the windows that you want to cascade. Therefore if you use GetWindow to enumerate and find only the window handles that you are interested in, you will be able to cascade the set of windows that you want.


      Build a man a fire, and he will be warm for a day
      Light a man on fire, and he will be warm for the rest of his life!

      1 Reply Last reply
      0
      • N nilaysoft

        Hi, friends, I create more than one windows (different instance but belongs to the same window class) on desktop, and want to manage them by "Cascade", "Tile Horizontally" and "Tile Vertically" commands. Of course the first idea is using window SDK functions: CascadeWindows(...), TileWindows(...). The problem arise however, The two functions will restore all other windows on desktop, which is not a good design of course. The solution is to write my own CascadeWindows and TileWindows subroutines. But I don't know how to do it. any idea? Thanks! wuwu

        P Offline
        P Offline
        Priya_Sundar
        wrote on last edited by
        #3

        Hi, Finally were you able to find the solution. If yes please do post the same.

        Priya Sundar

        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