CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Posts
    7

    [solved]Issue with ::ShowWindow(hwnd, SW_RESTORE)

    Im running a direct3d app which launches other applications, calls ::ShowWindow(hwnd, SW_MINIMIZE) on itself, and monitors that new app for its close down. When the launched application closes down, the direct3d app calls ::ShowWindow(hwnd, SW_RESTORE) - where hwnd is its handle.

    This works fine in debug mode. The app minimizes when another is launched, and the maximizes to full screen when the launched app closes down. In release mode though, it just doesnt maximize. Same code, just doesnt seem to work. Any ideas as to why?

    [EDIT] setting solved tag -- turns out there was no problem
    Last edited by sofcal; July 20th, 2009 at 04:54 AM.

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Issue with ::ShowWindow(hwnd, SW_RESTORE)

    Show this "Same code"
    Victor Nijegorodov

  3. #3
    Join Date
    May 2009
    Posts
    7

    Re: Issue with ::ShowWindow(hwnd, SW_RESTORE)

    Cheers for the quick reply VictorN, but Im ashamed to say I just found the error and it wasnt even code related.

    Im storing config files that define the applications to be launched, these store location of the exes, window name etc. Im using that window name to search for during my window enum function to get the handle for the opened application... In my tiredness, or stupidity I've used the wrong window name for the application I was trying to launch in release mode. DOH!

    So yeah, basically im a fool, and there's actually no code problem.

    Thanks for taking the time to try and help though.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured