CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2021
    Posts
    51

    How to avoid Titlebar flicker?

    Hi,
    In the the my code,from MFC form, I call the ::Setfocus(hwnd) function to focus another windows application only once.
    then i setfocus back to my MFC form.

    my code like this:
    Code:
    HWND hwnd=getappHwnd(app);
    ::Setfocus(hwnd);
    ::Setfocus(this->m_hWnd);
    Even though it's very fast but I still see the Title flicker.
    Can I disable it without using the UnTitlebar form (by set property border none)?

    Thanks you!
    Last edited by Dang.D.Khanh; July 20th, 2021 at 08:10 AM.

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

    Re: How to avoid Titlebar flicker?

    Where do you Setfocus to?
    What is the relationship between this hwnd and your "MFC form"?
    Which Title flickers?
    What is "the UnTitlebar form"?

    BTW, did you ever read the Announcement (Section Before you post...)?
    Victor Nijegorodov

  3. #3
    Join Date
    Jun 2021
    Posts
    51

    Re: How to avoid Titlebar flicker?

    Hi Sir, I have updated the post.
    by Moving the focus through apps make titlebar's form flickering.

    Can I disable this?

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,084

    Re: How to avoid Titlebar flicker?

    Quote Originally Posted by Dang.D.Khanh View Post
    Hi,
    In the the my code,from MFC form, I call the ::Setfocus(hwnd) function to focus another windows application only once.
    then i setfocus back to my MFC form.

    my code like this:
    Code:
    HWND hwnd=getappHwnd(app);
    ::Setfocus(hwnd);
    ::Setfocus(this->m_hWnd);
    Even though it's very fast but I still see the Title flicker.
    Can I disable it without using the UnTitlebar form (by set property border none)?
    If you do not want to cause flickering then why do change the focus to "hwnd" and then back?
    Victor Nijegorodov

  5. #5
    Join Date
    Jun 2021
    Posts
    51

    Re: How to avoid Titlebar flicker?

    Thanks sir, I got it.
    so i will remove this function in my code.

Tags for this Thread

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