Click here to Skip to main content
14,447,769 members

C / C++ / MFC

 
GeneralRe: Reverse engineering GCC output - need library file (name) and path. Pin
Vaclav_27-Jan-20 8:00
MemberVaclav_27-Jan-20 8:00 
AnswerRe: Reverse engineering GCC output - need library file (name) and path. Pin
leon de boer27-Jan-20 23:28
Memberleon de boer27-Jan-20 23:28 
GeneralRe: Reverse engineering GCC output - need library file (name) and path. Pin
Vaclav_28-Jan-20 3:45
MemberVaclav_28-Jan-20 3:45 
QuestionDPI aware, I am confused Pin
Erich Jarz23-Jan-20 8:25
MemberErich Jarz23-Jan-20 8:25 
AnswerRe: DPI aware, I am confused Pin
Gerry Schmitz23-Jan-20 8:37
mveGerry Schmitz23-Jan-20 8:37 
GeneralRe: DPI aware, I am confused Pin
Erich Jarz23-Jan-20 9:27
MemberErich Jarz23-Jan-20 9:27 
GeneralRe: DPI aware, I am confused Pin
leon de boer24-Jan-20 8:05
Memberleon de boer24-Jan-20 8:05 
GeneralRe: DPI aware, I am confused Pin
Erich Jarz24-Jan-20 8:42
MemberErich Jarz24-Jan-20 8: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 20:41
Memberleon de boer24-Jan-20 20:41 
GeneralRe: DPI aware, I am confused Pin
Erich Jarz26-Jan-20 21:22
MemberErich Jarz26-Jan-20 21:22 
GeneralRe: DPI aware, I am confused Pin
Gerry Schmitz24-Jan-20 9:27
mveGerry Schmitz24-Jan-20 9:27 
GeneralRe: DPI aware, I am confused Pin
Richard MacCutchan23-Jan-20 10:59
communityengineerRichard MacCutchan23-Jan-20 10:59 
Questionwin32 Radio button doesn't show when is checked Pin
coco24319-Jan-20 7:53
Membercoco24319-Jan-20 7:53 
AnswerRe: win32 Radio button doesn't show when is checked Pin
Victor Nijegorodov19-Jan-20 8:32
MemberVictor Nijegorodov19-Jan-20 8:32 
GeneralRe: win32 Radio button doesn't show when is checked Pin
coco24319-Jan-20 9:48
Membercoco24319-Jan-20 9:48 
GeneralRe: win32 Radio button doesn't show when is checked Pin
Victor Nijegorodov19-Jan-20 10:29
MemberVictor Nijegorodov19-Jan-20 10:29 
GeneralRe: win32 Radio button doesn't show when is checked Pin
coco24319-Jan-20 11:05
Membercoco24319-Jan-20 11:05 
GeneralRe: win32 Radio button doesn't show when is checked Pin
_Flaviu19-Jan-20 20:22
Member_Flaviu19-Jan-20 20:22 
GeneralRe: win32 Radio button doesn't show when is checked Pin
coco24320-Jan-20 7:50
Membercoco24320-Jan-20 7:50 
GeneralRe: win32 Radio button doesn't show when is checked Pin
_Flaviu20-Jan-20 20:41
Member_Flaviu20-Jan-20 20:41 
AnswerRe: win32 Radio button doesn't show when is checked Pin
Richard MacCutchan20-Jan-20 0:16
communityengineerRichard MacCutchan20-Jan-20 0:16 
AnswerRe: win32 Radio button doesn't show when is checked Pin
Stefan_Lang20-Jan-20 5:00
mveStefan_Lang20-Jan-20 5:00 
QuestionI cannot create a Release version. Pin
Member 1410515514-Jan-20 17:50
MemberMember 1410515514-Jan-20 17:50 
AnswerRe: I cannot create a Release version. Pin
Joe Woodbury14-Jan-20 21:10
professionalJoe Woodbury14-Jan-20 21:10 
SuggestionRe: I cannot create a Release version. Pin
Richard MacCutchan14-Jan-20 22:47
communityengineerRichard MacCutchan14-Jan-20 22: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.