Results 1 to 4 of 4

Thread: Unmaximize application

  1. #1

    Unmaximize application

    Hi!
    I'm writing a program that launches an external application and then resizes it and moves it to a certain position on the screen. This works okay for applications that aren't maximized, however with apps that are maximized it doesn't work at all. So my question is: how can I force an external application to un-maximize?

    I tried ShowWindow(ExtHandle, SW_SHOWNORMAL); but that doesn't work.

    Thanks a bunch!
    Ask me about the xcess game development kit

  2. #2

    Unmaximize application

    Okay, I got that solved... now I have another problem.
    I'm using CreateProcess to run an app and then I use EnumWindows to get the window handle. This works great with Notepad and most applications that don't have a splash screen. Is there any way to get the window handle of the actual application's window (and not the splash screen)?
    Thanks again!
    Ask me about the xcess game development kit

  3. #3

    Unmaximize application

    I guess you could try something like this: get the splash screen's thread id with GetWindowThreadProcessId, sleep while IsWindow with splash screens handle returns true and then you should get the window you want with EnumThreadWindows

  4. #4

    Unmaximize application

    cool! I'll try that! thanks!
    Ask me about the xcess game development kit

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •