CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Oct 2007
    Location
    Fredericksburg, VA
    Posts
    41

    MFC Maximize Function

    Hi All,

    I'm using Visual Studio 2003, and MFC/C++.
    I want to simulate just the update/refresh portion of the maximize command, on an ie window. I've already managed to connect to the window and can send minimize and maximize commands to it, as well as move the window around the screen, even hide and show the window if I wish to. I just need to know what message or function I have to pass to that window to get it to do JUST the refresh portion of its maximize command.

    Here's some background info and stuff I've already tried:

    I have an internet page, that uses java applets served from a server I have no control over. The internet page loads, but none of the background graphics, or button graphics load, so you pretty much have to click on a blank screen and "guess" where the buttons are.

    However, if you minimize the window, and maximize (tested over 100 times, by multiple people, under different conditions, with a 100% success ratio), it'll redraw the window properly.

    I've tried simulating a very rapid alt+tab and it restored the buttons graphics but not the main graphic (not acceptable to my client). I've also tried the following commands:

    ::RedrawWindow(hWnd,0,0,RDW_INVALIDATE);
    ::RedrawWindow(hWnd,0,0,0);
    ::UpdateWindow(hWnd);
    ::SetFocus(hWnd);

    Any help here would be greatly appreciated.

    Thanks,
    Brian
    Last edited by bderagon; November 6th, 2007 at 12:03 PM.

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