Subj : Re: How to solve windows getting distorted after pushing up DPI settings To : comp.programming From : [jongware] Date : Wed Oct 12 2005 12:20 am wrote in message news:1128961893.880539.221690@g44g2000cwa.googlegroups.com... > I am facing this problem that the windows in my application get > distorted after I > increase system's DPI settings to maybe 120. > I want to resolve this problem through coding(c++). > I found a useful article for the same > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dngdi/html/highdpiapp.asp The article states that standard window elements should resize themselve. AFAIK this has never worked properly (maybe just no-one ever bothered). If you want to resize/reposition manually you could try EnumChildWindows. MSDN sez about this: case WM_SIZE: // main window changed size // Get the dimensions of the main window's client // area, and enumerate the child windows. Pass the // dimensions to the child windows during enumeration. GetClientRect(hwnd, &rcClient); EnumChildWindows(hwnd, EnumChildProc, (LPARAM) &rcClient); with the EnumChildProc defined as BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam) cunningly using 'rcParent = (LPRECT) lParam;' to get the new dimensions so you can MoveWindow the elements around yourself. You will have to recalculate all new positions yourself; it may be possible to do so using original*120/96 -- where original is your x,y,w,h. If the window is originally created for the standard 96 dpi screen I'd guess the number 120 should actually be requested from the system, as shown in the article. Theunis de Jong aka [Jongware] -- Where's my daddy? Is that my daddy? He goes, 'Bugrit! Millenniumhand and shrimp!' -- .