Wednesday, May 16, 2012

MFC Feature Pack applications have wrong size when restored to maximized in secondary monitor

I've noticed that applications developed using MFC Feature Pack (VS2008), when restored from minimized to maximized in the secondary monitor, are sized as if they were in the primary monitor, leaving space for the Windows taskbar.



I've found this behaviour on my own programs, but also in the MFC Feature Pack samples, so I guess it's some bug in the MFC Feature Pack classes.



So, for example, I build the Visual Studio sample, run it, move it to the secondary monitor, maximize it there, minimize it, restore it, and I get this:



Check the gap under the window on the secondary monitor



Is there any known workaround for this? Has it been solved for more recent versions of MFC?



UPDATE:



It seems to happen only if the secondary monitor is on the right of the main one, but not if it's on the left.





No comments:

Post a Comment