How to Rollup a Window
-
No, this is not a question about cars:-D I would like to add functionality to my MFC dialog so that the user can click a button to make the window "rollup". Similar to the middle top-right button in Winamp. Anyone have any ideas on this? I'd prefer it if I could make the design similar to Winamp in that a "new" dialog is shown as the "rolled up" window, but if this is not possible, then just showing the title bar is acceptable (I suppose). I assume doing it this second way would just be resizing dialog to something slightly bigger than the titlebar, now that I think about it. :( TIA.:-D
-
It can't be that hard. Why not use SetWindowPos( ) keeping the left and top coordinates the same and resize the height and/or width of the window?
-
It can't be that hard. Why not use SetWindowPos( ) keeping the left and top coordinates the same and resize the height and/or width of the window?
That's what I was initially thinking, but that doesn't allow me to make the "rolled up" window have a different template. It'll just make the current window smaller, eh? If you'll notice what they do in Winamp (sorry, only program I know that has this feature), when it is rolled up, the title bar changes and buttons are added. Which is what i'm going for. The idea behind this is: the user can make the window as small as necessary without sacrificing the ability to use the more important functions (and Minimize makes the window disappear completely).
-
That's *sort of* what I mean, but I'm looking to rollup the whole app (so it's just like the Minimize or Close system buttons), instead of a just child window of a larger app. PJ Arends wrote: Having never seen Winamp :omg::wtf: What do you use for mp3s then?? please don't say WMP7. :-D
:confused:mp3s:confused: I actually prefer talk radio. This <clickety> radio station is left on 24/7 in my house.;)
CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!
-
That's what I was initially thinking, but that doesn't allow me to make the "rolled up" window have a different template. It'll just make the current window smaller, eh? If you'll notice what they do in Winamp (sorry, only program I know that has this feature), when it is rolled up, the title bar changes and buttons are added. Which is what i'm going for. The idea behind this is: the user can make the window as small as necessary without sacrificing the ability to use the more important functions (and Minimize makes the window disappear completely).
-
:confused:mp3s:confused: I actually prefer talk radio. This <clickety> radio station is left on 24/7 in my house.;)
CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!
-
From BC I take it? I call Victoria home, but right now I'm in a little town called Kitchener/Waterloo for a few more (hellish) years.:-D:-D
Atlantys wrote: From BC I take it? Abbotsford. Atlantys wrote: I call Victoria home, but right now I'm in a little town called Kitchener/Waterloo for a few more (hellish) years. Oh man:(, you gotta come back to lotusland, the weather is great:-D:-D
CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!
-
That's *sort of* what I mean, but I'm looking to rollup the whole app (so it's just like the Minimize or Close system buttons), instead of a just child window of a larger app. PJ Arends wrote: Having never seen Winamp :omg::wtf: What do you use for mp3s then?? please don't say WMP7. :-D
I would think it could work if you used a dialog template for the minimized window, just remove the title bar. When your app is "minimized", just destroy your main window, and recreate your main window using your minimized dialog. Of course this would be a lot easier to implement if your main window is also a dialog;P. If you want the window to visible shrink, you would have to use a timer and SetWindowPos().
CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!
-
That's what I was initially thinking, but that doesn't allow me to make the "rolled up" window have a different template. It'll just make the current window smaller, eh? If you'll notice what they do in Winamp (sorry, only program I know that has this feature), when it is rolled up, the title bar changes and buttons are added. Which is what i'm going for. The idea behind this is: the user can make the window as small as necessary without sacrificing the ability to use the more important functions (and Minimize makes the window disappear completely).
-
That's what I was initially thinking, but that doesn't allow me to make the "rolled up" window have a different template. It'll just make the current window smaller, eh? If you'll notice what they do in Winamp (sorry, only program I know that has this feature), when it is rolled up, the title bar changes and buttons are added. Which is what i'm going for. The idea behind this is: the user can make the window as small as necessary without sacrificing the ability to use the more important functions (and Minimize makes the window disappear completely).
In winamp when the title bar is changing it is pulling bitmaps from either the default skin or from zip files containing the other skins (if you rename a skin file to .zip it will be unzippable). Same goes for the buttons and the rest of the graphics in winamp. I'm not sure what is done programatically to get them to draw over, but a few of the things mentioned looked like it could work. I had a little fun doing a skin for winamp once so I learned about how they change the image. :) I hope that helps some. Quinn