Click here to Skip to main content
15,886,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reverse engineering GCC output - need library file (name) and path. Pin
Vaclav_27-Jan-20 7:00
Vaclav_27-Jan-20 7:00 
AnswerRe: Reverse engineering GCC output - need library file (name) and path. Pin
leon de boer27-Jan-20 22:28
leon de boer27-Jan-20 22:28 
GeneralRe: Reverse engineering GCC output - need library file (name) and path. Pin
Vaclav_28-Jan-20 2:45
Vaclav_28-Jan-20 2:45 
QuestionDPI aware, I am confused Pin
Erich Jarz23-Jan-20 7:25
Erich Jarz23-Jan-20 7:25 
AnswerRe: DPI aware, I am confused Pin
Gerry Schmitz23-Jan-20 7:37
mveGerry Schmitz23-Jan-20 7:37 
GeneralRe: DPI aware, I am confused Pin
Erich Jarz23-Jan-20 8:27
Erich Jarz23-Jan-20 8:27 
GeneralRe: DPI aware, I am confused Pin
leon de boer24-Jan-20 7:05
leon de boer24-Jan-20 7:05 
GeneralRe: DPI aware, I am confused Pin
Erich Jarz24-Jan-20 7:42
Erich Jarz24-Jan-20 7:42 
Hi
Thanks for your reply. I already tried to calculate the coord with GetDeviceCaps, but that does not work correctly! When I set 150% font size in windows I get a ratio of 144/96=1.5 as expected, but the controls and the dialog itself do not scale that way!

Here a different example:

I have drawn two red rectangles, one with the size of the dialog and an inner one which is the size of a group box. For the size of the dialog rectangle I use GetClientRect. It works on all font sizes (DPI scalings) correct.
For the inner rectangle inside the group box I tried to recalculate the coords with GetDeviceCaps, but that does not work. If I change scaling in windows the inner rectangle is completely off.
So I tried to figure out the correct coords for the inner rectangle by trial and error. Below are the coords which draw the correct rectangles in relation to the group box.
But how can I calculate them, I get some weird values? In the x axis I would get a factor of 1.3328 and on the y axis a factor of 1.62 with 150% scaling, not 1.5 as expected!?

Screenshot at 100%

// coords at 100%
Dialog rectangle coord = 0/0 - 1445/832
group box rectangle coord = 624/9 - 1247/581

Screenshot at 125%

// coords at 125%
Dialog rectangle coord = 0/0 - 1685/1088
group box rectangle coord = 728/11 - 1456/761

Screenshot at 150%

// coords at 150%
Dialog rectangle coord = 0/0 - 1926/1344
group box rectangle coord = 831/13 - 1664/941

How can I calculate the right coordinates for these elements ?

thanks
regards
Erich
GeneralRe: DPI aware, I am confused Pin
leon de boer24-Jan-20 19:41
leon de boer24-Jan-20 19:41 
GeneralRe: DPI aware, I am confused Pin
Erich Jarz26-Jan-20 20:22
Erich Jarz26-Jan-20 20:22 
GeneralRe: DPI aware, I am confused Pin
Gerry Schmitz24-Jan-20 8:27
mveGerry Schmitz24-Jan-20 8:27 
GeneralRe: DPI aware, I am confused Pin
Richard MacCutchan23-Jan-20 9:59
mveRichard MacCutchan23-Jan-20 9:59 
Questionwin32 Radio button doesn't show when is checked Pin
coco24319-Jan-20 6:53
coco24319-Jan-20 6:53 
AnswerRe: win32 Radio button doesn't show when is checked Pin
Victor Nijegorodov19-Jan-20 7:32
Victor Nijegorodov19-Jan-20 7:32 
GeneralRe: win32 Radio button doesn't show when is checked Pin
coco24319-Jan-20 8:48
coco24319-Jan-20 8:48 
GeneralRe: win32 Radio button doesn't show when is checked Pin
Victor Nijegorodov19-Jan-20 9:29
Victor Nijegorodov19-Jan-20 9:29 
GeneralRe: win32 Radio button doesn't show when is checked Pin
coco24319-Jan-20 10:05
coco24319-Jan-20 10:05 
GeneralRe: win32 Radio button doesn't show when is checked Pin
_Flaviu19-Jan-20 19:22
_Flaviu19-Jan-20 19:22 
GeneralRe: win32 Radio button doesn't show when is checked Pin
coco24320-Jan-20 6:50
coco24320-Jan-20 6:50 
GeneralRe: win32 Radio button doesn't show when is checked Pin
_Flaviu20-Jan-20 19:41
_Flaviu20-Jan-20 19:41 
AnswerRe: win32 Radio button doesn't show when is checked Pin
Richard MacCutchan19-Jan-20 23:16
mveRichard MacCutchan19-Jan-20 23:16 
AnswerRe: win32 Radio button doesn't show when is checked Pin
Stefan_Lang20-Jan-20 4:00
Stefan_Lang20-Jan-20 4:00 
QuestionI cannot create a Release version. Pin
Member 1410515514-Jan-20 16:50
Member 1410515514-Jan-20 16:50 
AnswerRe: I cannot create a Release version. Pin
Joe Woodbury14-Jan-20 20:10
professionalJoe Woodbury14-Jan-20 20:10 
SuggestionRe: I cannot create a Release version. Pin
Richard MacCutchan14-Jan-20 21:47
mveRichard MacCutchan14-Jan-20 21:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.