Calling CFrameWnd::RecalcLayout causes slight flicker in left pane (CTreeView) of outlook style splitter app
-
Hello, I'm writing an MFC app that is in the style of MS outlook, with a CTreeView in the left hand pane, and a CFrameWnd, called CRightPaneFrame, that contains a view (which view varies, depending on which node on the CTreeView is selected) - a splitter application. In the function that switches views, called by the CTreeView, the final thing we do is call RecalcLayout(), to have everything (re)drawn. This causes slight, although noticeable flicker in the left pane, as the Main frame of the application is (apparently) redrawn. How can I prevent this flicker from occurring, by limiting redrawing to CRightPaneFrame and its current CView? According to MSDN, RecalcLayout is "Called by the framework when the standard control bars are toggled on or off or when the frame window is resized". This seems like overkill for this task (updating CRightPaneFrame/its underlying view). How all can I accomplish this task without redrawing my left pane? Regards, Sternocera
-
Hello, I'm writing an MFC app that is in the style of MS outlook, with a CTreeView in the left hand pane, and a CFrameWnd, called CRightPaneFrame, that contains a view (which view varies, depending on which node on the CTreeView is selected) - a splitter application. In the function that switches views, called by the CTreeView, the final thing we do is call RecalcLayout(), to have everything (re)drawn. This causes slight, although noticeable flicker in the left pane, as the Main frame of the application is (apparently) redrawn. How can I prevent this flicker from occurring, by limiting redrawing to CRightPaneFrame and its current CView? According to MSDN, RecalcLayout is "Called by the framework when the standard control bars are toggled on or off or when the frame window is resized". This seems like overkill for this task (updating CRightPaneFrame/its underlying view). How all can I accomplish this task without redrawing my left pane? Regards, Sternocera
I think perhaps your naming gives it away - CRightPaneFrame! CFRameWnd (if memory serves) should be used for the Frame window which holds all the other child windows that your app needs to display. Have you tried deriving your right pain( :( ) from CView or similar?
-
I think perhaps your naming gives it away - CRightPaneFrame! CFRameWnd (if memory serves) should be used for the Frame window which holds all the other child windows that your app needs to display. Have you tried deriving your right pain( :( ) from CView or similar?
CFrameWnds may display views, or other CFrameWnds. They are, as the name suggests, for framing things. Regards, Sternocera
-
CFrameWnds may display views, or other CFrameWnds. They are, as the name suggests, for framing things. Regards, Sternocera