Home Dashboard Directory Help
Search

EnableLoadWindowPlacement(false) does not work correctly in MFC feature pack by Marc_75


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 641665
Opened: 2/7/2011 12:24:15 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

When using EnableLoadWindowPlacement(false) to prevent MFC from restoring the last known main window size and position CMDIFrameWndEx::PreCreateWindow() still reads back the last known window size and position by means of m_Impl.RestorePosition(cs)

BOOL CMDIFrameWndEx::PreCreateWindow(CREATESTRUCT& cs)
{
    m_Impl.SetDockingManager(&m_dockManager);
    m_Impl.RestorePosition(cs);
    return CMDIFrameWnd::PreCreateWindow(cs);
}

workaround:
restore the attributes to the original value CW_USEDEFAULT:
cs.cx = CW_USEDEFAULT;
cs.cy = CW_USEDEFAULT;
cs.x = CW_USEDEFAULT;
cs.y = CW_USEDEFAULT;
Details
Sign in to post a comment.
Posted by Microsoft on 2/8/2011 at 9:57 AM
Hello,

Thanks for the report. This issue has been fixed in MFC for the next major release of Visual Studio.

Pat Brenner
Visual C++ Libraries Development
Posted by Microsoft on 2/7/2011 at 12:49 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.