Recent Posts

Pages: 1 2 3 4 5 6 [7] 8 9 10
61
General (but related to Code::Blocks) / Display resolution issue
« Last post by JoeH on March 02, 2026, 03:07:10 pm »
   I am experiencing a difficulty with retrieving the dpi display value.  I want my program to draw to the display at actual size.  As an example, I want to draw a circle with a 3 inch diameter to the screen and when the display is measured with a ruler, the circle measures 3 inches in diameter.  I want to accomplish this without the user having to input any scaling information and regardless of the display resolution the user has implemented on his computer.

   Here are the details of my installation from the CodeBlocks Help/About display:

Name               : Code::Blocks
Version                     : 25.03-r13644
SDK Version            : 2.25.0
Scintilla Version                 : 3.7.5
Author               : The Code::Blocks Team
E-mail               : info@codeblocks.org
Website                    : https://www.codeblocks.org
OS                       : Windows ll (build 26100), 64-bit edition
Scaling factor            : 1.000000
Detected scaling factor      : 1.000000
Display PPI            : 96x96
Display count            : 1
Display 0 (\\.\DISPLAY1)      : XY=[0,0]; Size=[1920,1080]; Primary

wxWidgets Library (wxMSW port)
Version 3.2.7 (Unicode: wchar_t, debug level: 1),
compiled at Mar 25 2025 17:16:27

Runtime version of toolkit used is 10.0.26100.

I am using a HP laptop that has a display that is 15 inches wide and 8.5 inches high.  My calculator tells me that the PPI for 1920x1080 is 127 (close enough) in each direction.  As you can see above, the reported Display PPI is 96x96.  These are the values I get within my program as well.

   If I manually enter the 127 ppi into my program I get the display results I desire (actual size).  Is there a mechanism to get the actual ppi from a system call?

   Thanks for your help.

Joe
62
Quote
BTW. I nener known that we(or some cb dev) can access the Fortran plugin snv repo.

Some of us can (see the commit log there), but usually we avoid the Fortran-specific part.
63
Good work guys.

BTW. I nener known that we(or some cb dev) can access the Fortran plugin snv repo.
64
Yes, you are modifying the main repo. Ollydbg or you can do this, I cannot because I do not have access currently to my computer.

Code
Deleting       FortranProject
Committing transaction...
Committed revision 13805

I also got a clean update from externals.

Thanks for your patients.
65
Yes, you are modifying the main repo. Ollydbg or you can do this, I cannot because I do not have access currently to my computer.

Ok, I'll do another clean checkout, and follow your directions.
I just didn't want to modify something I didn't understand.
Thanks.
66
Yes, you are modifying the main repo. Ollydbg or you can do this, I cannot because I do not have access currently to my computer.
67
You forgot the second part of my message:
Code
svn commit

Doesn't that mean I'm committing to the main repo. I thought whoever did the change in the first place would have committed a fix.

Does everyone checking out the main repo have to do this.
There must be something I'm not understanding.
68
You forgot the second part of my message:
Code
svn commit
69
I completely delete trunk.
I do a clean chieckout
F:\usr\Programs\TortoiseSVN\bin\svn.exe checkout https://svn.code.sf.net/p/codeblocks/code/trunk
I get the error:
Code
Fetching external item into 'trunk\src\plugins\contrib\FortranProject':
svn: warning: W155035: The external 'https://svn.code.sf.net/p/fortranproject/code/trunk' defined in svn:externals at 'F:\usr\Proj\cbDevel328WrkCC\trunk\trunk\src\plugins\contrib' cannot be checked out because 'F:\usr\Proj\cbDevel328WrkCC\trunk\trunk\src\plugins\contrib\FortranProject' is already a versioned path.

Checked out revision 13804.
svn: E205011: Failure occurred processing one or more externals definitions


I cd to the contrib directory and delete fortran project. It seem to do it.

Code
cd .\trunk\src\plugins\contrib\
F:\usr\Proj\cbDevel328WrkCC\trunk\src\plugins\contrib> F:\usr\Programs\TortoiseSVN\bin\svn.exe delete .\FortranProject\
D         FortranProject
D         FortranProject\FortranProject_cbsvn_Windows.cbp

I cd back to trunk and do an update.
I still get the update error.

Code
 F:\usr\Programs\TortoiseSVN\bin\svn.exe update
Updating '.':

Fetching external item into 'src\plugins\contrib\FortranProject':
svn: warning: W155035: The external 'https://svn.code.sf.net/p/fortranproject/code/trunk' defined in svn:externals at 'F:\usr\Proj\cbDevel328WrkCC\trunk\src\plugins\contrib' cannot be checked out because 'F:\usr\Proj\cbDevel328WrkCC\trunk\src\plugins\contrib\FortranProject' is already a versioned path.

At revision 13804.
svn: E205011: Failure occurred processing one or more externals definitions
F:\usr\Proj\cbDevel328WrkCC\trunk>
70
In the first code tag the path is incorrect, FortranProject is not in trunk but in trunk/src/plugins/contrib
Pages: 1 2 3 4 5 6 [7] 8 9 10