CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2001
    Location
    Southampton , UK
    Posts
    42

    Invalidate MDI window

    Im trying to get a MDI child window to redraw itself after changing some colour options in my app. I have tried:

    AfxGetMainWnd()->RedrawWindow();


    and
    AfxGetMainWnd()->Invalidate();



    but the MDI window isnt redrawn, it just gets update bit by bit by scrolling the window etc. How can i get the MDI window to complete redraw itself (its based on a CListView btw).

    Thanks,

    Andy



  2. #2
    Join Date
    May 2000
    Location
    New Jersey,US
    Posts
    64

    Re: Invalidate MDI window

    Call Invalidate() followed by UpdateWindow()

    Happy Coding!!!
    Sanjay



  3. #3
    Join Date
    Jun 2001
    Location
    Southampton , UK
    Posts
    42

    Re: Invalidate MDI window

    Looks like im going to have to response to my own post here!!!

    CMainFrame *pMainFrame = (CMainFrame *)AfxGetMainWnd();
    pMainFrame->MDIGetActive()->Invalidate();



    Only thing is, this only updates the active MDI view, not the others...


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