Click here to Skip to main content
15,742,477 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi I have recently migrated the VC++ code from visual studio 2010 to visual studio 2013. Source code contains two type controls 1. Win32 Controls 2. MFC Controls. After building the code in visual studio 2013 the win32 controls are getting distorted i.e static texts or buttons are getting merged in to frame of window. Please see the link for images of control in both version of Visual Studio : . Please help.
Updated 14-Jan-16 0:10am
Sergey Alexandrovich Kryukov 14-Jan-16 0:49am    
What's the use of showing pictures? No code sample, no explanation of the problem. How can you imagine figuring out what's going on?
Jochen Arndt 14-Jan-16 4:23am    
The position of the controls is set somewhere in your application. So check your code and/or resource files.

As already mentioned by Sergey, we can't help without having that information.
WENzER 14-Jan-16 6:09am    
The code is same nothing changed from VS2010 it is working fine with VS2010. But the same code when am building on VS2013 the WIN32 controls are getting clipped as shown in images. I thought it may be related to DPI settings so when I changed the DPI settings of my monitor to 125 it looked better but not as VS2010. Then I build the code by changing VS2013 Project Manifest Property to High DPI Aware. but that also did not work.
Jochen Arndt 14-Jan-16 6:38am    
I had a look at the image (what I and most here normally not would do).

The upper dialog has a thin border while the lower one has a thicker one. As a result, the embedded controls (especially the rectangle) are moved right and down by the border thickness and are clipped at the right / bottom.

So the problem is sourced by the dialog frame where both does not look like a common Windows dialog.

If you did not solve the problem yourself with this information, you should at least show us how those uncommon dialog frames are created.
WENzER 14-Jan-16 6:46am    
Ok,Its an legacy application and control code is written in an RC file *.dlg file code written something like :

INITAPP DIALOG 96, 98, 167, 67
CONTROL "", INIT_FRAME, "static", SS_BLACKFRAME | WS_CHILD, 4, 4, 156, 56
CONTROL "", INIT_LINE1_STATIC, "static", SS_LEFT | WS_CHILD, 8, 14, 127, 8
CONTROL "", INIT_LINE2_STATIC, "static", SS_LEFT | WS_CHILD, 8, 38, 127, 8

1 solution

I Think issue was with the border frame thickness of dialog box. I changed the following property in project settings & that worked for me.
Project Properties->Configuration Properties->General->Platefortoolset, set it to
Visual Studio 2013 - Windows XP (v120_xp)

And it worked. Thanks everyone for help
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900