![]() |
|
#1
|
|||
|
|||
Win32 Window Shading behavior (like linux)I'm writing a program to work with ALL windows applications. It will cause double clicking on the titlebar of an application to shade the window (exactly like window behavior in linux). Shading meaning the main part of the application window 'rolls up' and all that is visiible is the titlebar of the application.
What I'm wondering is what the best way to go about this application might be. I've had one person tell me that the only way to do it with the original windows is by modifying the windows API (which im not really sure how to go about doing), and my own ideas are the following: Idea 1. Just set the height of the application window to 0 (I realized that this won't work with everything because not all applications will have to listen to setting the window height to 0, so this option is out. Idea 2. When the titlebar of the application is double clicked, minimize the original window, and create a fake window with 0 height that is in the same location as the application's titlebar, and the icon and titlebar text of the application clicked are the same on this fake window. Idea 3. I was thinking it MAY be possible to just hide the bottom part of an application, similar to the way windows media player hides the titlebar of its own application window, I Was wondering if this is a possibility? I'm open to other suggestions, code examples, and anything else anyone has to offer. Thanks for taking the time to read my post. If my description of what I'm trying to do is too vague please let me know, and I will post screenshots and a more elaborate description. Thanks again. will |
|||
|
#2
|
|||
|
|||
|
Idea 1. there are other programs on the market (free ones) that do this window shading, and I believe this is what they do. however, they do not work all the time. so if what you want is absolute reliability, then you are right in discrediting this idea.
Idea 2. If you want absolute reliability, then this would seem to be the best idea. You would want to set some kind of hook to catch double-clicks on the titlebars, and then your hook handler would be something like this: CPP / C++ / C Code:
CPP / C++ / C Code:
[EDIT] i thought of an idea for setting the "hide" variable above. what you could do is insert this code after the call to GetClassInfoEx: CPP / C++ / C Code:
CPP / C++ / C Code:
Last edited by ubergeek : 17-Apr-2005 at 23:01.
Reason: fixed code. silly me. in the last code example, win_clicked_class_name is already a pointer, so the & is unnecessary and will most likely cause a segmentation fault.
|
|
#3
|
|||
|
|||
|
sorry, in the second-to-last code box, it should be shadedwincl.lpszClassName
|
|
#4
|
|||
|
|||
|
very cool. Thanks for taking the time to type out that reply, i appreciate it much. I'll post in this thread if i need more help. Thanks again.
|
Recent GIDBlog
Vista ?Widgets? on Windows XP by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| #including resource file causing window procedure to be undeclared??? | ubergeek | C++ Forum | 3 | 07-Feb-2005 14:39 |
| Changing window start colour | Rosdahale | C++ Forum | 5 | 19-Jan-2005 15:51 |
| Changing monitors on a Linux machine | JdS | Computer Software Forum - Linux | 10 | 23-Dec-2004 09:49 |
| Linux Kernel Upgrade Mini Howto | dsmith | Computer Software Forum - Linux | 3 | 05-Apr-2004 22:10 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The