Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a MFC SDI application created and added CDialogBar to set as main toolbar as you look in the screenshot I attached. It works well on every windows os(Xp, 7, 8, 8.1, 10) of windows tablet devices except only Microsoft Surface.

Please look at this screenshot. the CDialogBar menu is cut off. I don't know reason why this happens. The drawing issue always only occurs on Microsoft Surface 3 which has high resolution and high DPI screen and it works good on any other tablet. This is very strange issue so I dragged toolbar(CDialogBar) and dropped down on any place then the toolbar was re-painted clearly. So.. through this issue, I am sure that this is re-drawing issue. Is there any drawing function to redraw that area?

I am attaching my minimized source code to represent drawing issue.

Drawing Issue Screenschot

Minimal Source code to represent drawing issue

Please help me. Thanks

Operating System: Windows 10
Tablet: Microsoft Surface 3
Tool: Visual Studio 2015 Update 3
DPI rate: 150%

What I have tried:

To resolve this issue, I have been trying to set DPI Awareness property to None, but the graphics Interface was not good and they were all stretched. I really don't like this solution, I have to find other solution without setting DPI Awareness to "None".
Posted
Updated 30-Aug-17 0:56am

1 solution

To enforce a redraw you can use InvalidaRect.
 
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