How to change resizing behavior in another app's window? (Experienced programmer's Q)

Discussion in 'Win32' started by heygreg, Oct 1, 2006.

  1. heygreg

    heygreg New Member

    Joined:
    Oct 1, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    In a nutshell:

    I'm writing a program that will allow me to put tabs into Internet Explorer 6.0 on any machine, even if I don't have admin privileges. The only problem is actually PUTTING the toolbar into internet explorer windows. I can't add it to the rebar, because presumably I'd need to write to the registry and have admin rights. Instead, I want to use the Win32 API to HOOK the correct windows and change the way things resize inside the IEFrame window.

    I want the tab band to appear, say, right above the status bar. I've run into problems and I'm not sure what a good way of doing this is.

    First, I tried to SUBCLASS both the IEFrame window and the window displaying the webpage. When the window displaying the webpage is told to size to a certain size, I want it to size to LESS than that size, to make room for my bar. However, I find that changing the MESSAGE passed to the window has no effect! So instead, I installed a HOOK on the window displaying the webpage, and call SetWindowPos myself when it's resizing (I set a flag in my app before this so I don't go into an infinite loop by resizing the window while handling a resize).

    HOWEVER, sometimes this also doesn't work! For example in the following situations:
    1) I use ftp with folder view to navigate to a site. Probably another window class is being used to display the folder.
    2) When the "your popup was blocked" thing slides out, the webpage window gets UNHOOKED somehow. If I then try to resize the IEFrame, my hook never gets called and the SetWindowPos never gets executed.

    Now i want to resize the REBAR instead. I tried resizing the REBAR using the same kind of hook method. However, the window that displays the webpage refuses to budge and is still where it always is, and overlaps the REBAR window (actually a window of class WorkerW).

    I'll try to make the statusbar expand and stick my band in there, maybe. That would be ideal...

    SO MY QUESTION...

    WHATS THE TECHNIQUE TO STOP THE DEFAULT RESIZING BEHAVIOR OF THE CHILD WINDOWS? IF I WANT TO RESIZE THEM DIFFERENTLY, WHAT CAN I POSSIBLY DO?
    In my case, I want to make room for a band programmatically at run-time. Is there any way to do this?

    Because currently, the ONLY way I can see of doing it is using a TIMER that runs 10 times a second and does it to every IE window. Kind of a waste if you ask me.

    Greg
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice