Dialog border different after porting code from Vi

2019-01-28 07:46发布

I have just ported a dialog based MFC program from Visual Studio 6 to to Visual Studio 2013. There were no major issues and the program runs perfectly once compiled under VS 2013.

The only visible difference is the thickness of the dialog's borders (see screen shots below made under Windows 7).

enter image description here

More facts:

  • It's not a manifest issue, both manifests in the old and new versions are strictly the same.
  • The .rc hasn't been messed up during the conversion of the project by VS2012. If I compile the converted project again with VS6 I get thin borders.
  • I can reproduce the issue with a freshly wizard generated program in Visual Studio 6.
  • A message box shown with AfxMessageBox also has a thin border when compiled with VS6 and a thick border when compiled with VS2013.

1条回答
可以哭但决不认输i
2楼-- · 2019-01-28 08:10

I have experienced similar issue and it was related with subsystem flag of PE header.

I needed to debug Windows a bit to find the reason: the function win32k!_GetWindowBorders checks that PE flag against 6.0 (probably to support new flag SM_CXPADDEDBORDER).

See also:

查看更多
登录 后发表回答