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

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 641665 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 2/7/2011 12:24:15 AM
Access Restriction Public

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;
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)