locked
Reducing flicker when resizing dialog (VS2015 using new dynamic moving-sizing features) RRS feed

  • Question

  • Hi

    VS2015

    MFC

    Dialog

    I have set up all of my controls to size as desired. If I maximize/restore the window they is an acceptable amount of flicker.

    If I resize by dragging a boundary then there is a noticeable amount of flicker.

    Can this be improved? Previously I had been deriving my dialogues from CSizingDialog which is available at www.codeproject.com and it did not have this level of flicker. So I would appreciate any advice on dealing with this issue.

    Thank you.

    Andrew

    Tuesday, October 13, 2015 12:28 PM

Answers

  • Try this: The dialog set "clip children" propery.


    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.

    Hi

    Thanks for your suggestion. This makes the rendering work incorrectly.


    Yes, if the dialog set "Clip children", the control of children need to implement the own drawing process, the parent dialog window is not responsible for drawing.

    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.

    • Proposed as answer by Shu 2017 Friday, October 16, 2015 9:28 AM
    • Marked as answer by Shu 2017 Tuesday, November 3, 2015 1:59 AM
    Wednesday, October 14, 2015 8:25 AM

All replies

  • Hi, Andrew:

       I sets some controls with these new features, including CComboBox controls, edit controls and etc. But flicker problems doesn’t appear. Thus it seems that the problem may be related to some functions about resizing window or others in your project, like OnSize(). Can you provide more details to reproduce this problem?

    Wednesday, October 14, 2015 6:09 AM
  • Try this: The dialog set "clip children" propery.

    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.

    • Proposed as answer by Shu 2017 Friday, October 16, 2015 9:28 AM
    • Marked as answer by Shu 2017 Friday, October 23, 2015 5:02 AM
    • Unmarked as answer by Shu 2017 Friday, October 23, 2015 5:05 AM
    Wednesday, October 14, 2015 6:22 AM
  • Try this: The dialog set "clip children" propery.

    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.

    Hi

    Thanks for your suggestion. This makes the rendering work incorrectly.

    Wednesday, October 14, 2015 8:10 AM
  • Hi, Andrew:

       I sets some controls with these new features, including CComboBox controls, edit controls and etc. But flicker problems doesn’t appear. Thus it seems that the problem may be related to some functions about resizing window or others in your project, like OnSize(). Can you provide more details to reproduce this problem?

    There is about 125 controls on this dialogue of various types:

    Static

    Edit

    Combo

    Group

    Check

    MFCEditBrowse

    ComoEx

    Andrew

    Wednesday, October 14, 2015 8:12 AM
  • Try this: The dialog set "clip children" propery.


    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.

    Hi

    Thanks for your suggestion. This makes the rendering work incorrectly.


    Yes, if the dialog set "Clip children", the control of children need to implement the own drawing process, the parent dialog window is not responsible for drawing.

    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.

    • Proposed as answer by Shu 2017 Friday, October 16, 2015 9:28 AM
    • Marked as answer by Shu 2017 Tuesday, November 3, 2015 1:59 AM
    Wednesday, October 14, 2015 8:25 AM
  • Hi

    But it does not really help me. The whole point of this dynamic layout it to simplify my code. I can go back to CSizingDialog and move my controls using that class (still no clip children or owner draw of any kind) Or I can stick with the dynamic layout.

    The mechanics of the two procedures must be different. This is why I did not mark it as an answer. I don't want to draw my controls myself.

    Andrew

    Friday, October 16, 2015 1:01 PM
  • We know that the CComboBox has text selection problems during dialog box resizing and that you had implemented a workaround to deselect the text.

    If you remove the CComboBox controls from the current experiment and remove the related workaround code does the flicker problem still occur?


    • Edited by RLWA32 Friday, October 16, 2015 1:06 PM
    Friday, October 16, 2015 1:06 PM
  • Hi

    Thanks for the suggestion. At the moment I am on a bit of a deadline and really have to move on with the project. Afterwards I can come back and look at this. I don't think it is the combos, but it may be. There are also quite a lot of those browseedit controls on there.

    I guess, it is just a pity that the mechanism doesn't resize all the controls after it knows you have finished resizing.

    We will see.

    Andrew

    Friday, October 16, 2015 5:47 PM