WIP: Add support for per-monitor DPI awareness#422
Draft
Conversation
… Add support for per-monitor DPI awareness (9)
# Conflicts: # Externals/crystaledit/Sample/MainFrm.h # Externals/crystaledit/editlib/ccrystaltextview.h # Externals/crystaledit/editlib/dialogs/memcombo.cpp # Externals/crystaledit/editlib/renderers/ccrystalrenderergdi.cpp # Externals/crystaledit/editlib/utils/hqbitmap.cpp # Externals/crystaledit/editlib/utils/hqbitmap.h # Src/Common/BCMenu.cpp # Src/MainFrm.cpp # Src/Merge.h # Src/Merge.vs2017.vcxproj.filters # Src/Merge.vs2019.vcxproj.filters # Src/TrDialogs.h
# Conflicts: # Src/DirFrame.cpp
# Conflicts: # Externals/crystaledit/Sample/SampleStatic.vcxproj # Externals/crystaledit/Sample/SampleStatic.vs2017.vcxproj # Externals/crystaledit/Sample/SampleStatic.vs2017.vcxproj.filters # Externals/crystaledit/Sample/SampleStatic.vs2019.vcxproj.filters # Externals/crystaledit/Sample/resource.h # Src/Common/BCMenu.cpp # Src/Common/MDITabBar.h # Src/Common/MessageBoxDialog.cpp # Src/DirView.cpp # Src/DirView.h # Src/EditorFilepathBar.cpp # Src/EditorFilepathBar.h # Src/LineFiltersDlg.cpp # Src/MainFrm.cpp # Src/MainFrm.h # Src/Merge.h # Src/Merge.vcxproj # Src/Merge.vcxproj.filters # Src/Merge.vs2017.vcxproj # Src/Merge.vs2017.vcxproj.filters # Src/MergeFrameCommon.cpp # Src/MergeFrameCommon.h # Src/MergeStatusBar.cpp # Src/MergeStatusBar.h # Src/OpenFrm.cpp # Src/OpenView.cpp # Src/PluginsListDlg.cpp
|
|
||
| afx_msg LRESULT OnDpiChanged(WPARAM wParam, LPARAM lParam) | ||
| { | ||
| int olddpi = m_dpi; |
Check notice
Code scanning / CodeQL
Unused local variable
|
|
||
| afx_msg LRESULT OnDpiChanged(WPARAM wParam, LPARAM lParam) | ||
| { | ||
| int olddpi = m_dpi; |
Check notice
Code scanning / CodeQL
Unused local variable
| GetClientRect(m_hwndDlg, &rcClient); | ||
| const int newnonclientsx = rc.Width() - rcClient.Width(); | ||
| const int newnonclientsy = rc.Height() - rcClient.Height(); | ||
| const RECT* pRect = reinterpret_cast<RECT*>(lParam); |
Check notice
Code scanning / CodeQL
Unused local variable
Comment on lines
+168
to
+175
| /* | ||
| CFont *pFont = GetFont(); | ||
| LOGFONT lfFont; | ||
| pFont->GetLogFont(&lfFont); | ||
| CSize size = Dialog_GetSizeFromTemplate(m_lpszTemplateName, lfFont.lfFaceName, MulDiv(abs(lfFont.lfHeight), 72, m_dpi)); | ||
| SetWindowPos(nullptr, 0, 0, size.cx, size.cy, SWP_NOMOVE | SWP_NOZORDER); | ||
| LoadDynamicLayoutResource(m_lpszTemplateName); | ||
| */ |
Check notice
Code scanning / CodeQL
Commented-out code
Comment on lines
+157
to
+161
| // sizeMin = GetDynamicLayout()->GetMinSize(); | ||
| // CRect rc = m_rcInit; | ||
| // AdjustWindowRectEx(&rc, GetStyle(), false, GetExStyle()); | ||
| // SetWindowPos(nullptr, 0, 0, rc.right - rc.left, rc.bottom - rc.top, SWP_NOMOVE | SWP_NOZORDER); | ||
| // GetDynamicLayout()->Adjust(); |
Check notice
Code scanning / CodeQL
Commented-out code
Src/Common/BCMenu.cpp
Outdated
Comment on lines
754
to
758
Check notice
Code scanning / CodeQL
Commented-out code
| * displays a tip for each path (as a tooltip). | ||
| */ | ||
| class CEditorFilePathBar : public CDialogBar, public IHeaderBar | ||
| class CEditorFilePathBar : public DpiAware::CDpiAwareWnd<CDialogBar>, public IHeaderBar |
Check notice
Code scanning / CodeQL
Undisciplined multiple inheritance
Comment on lines
+166
to
+176
| if (bDynamicLayoutEnabled) | ||
| { | ||
| /* | ||
| CFont *pFont = GetFont(); | ||
| LOGFONT lfFont; | ||
| pFont->GetLogFont(&lfFont); | ||
| CSize size = Dialog_GetSizeFromTemplate(m_lpszTemplateName, lfFont.lfFaceName, MulDiv(abs(lfFont.lfHeight), 72, m_dpi)); | ||
| SetWindowPos(nullptr, 0, 0, size.cx, size.cy, SWP_NOMOVE | SWP_NOZORDER); | ||
| LoadDynamicLayoutResource(m_lpszTemplateName); | ||
| */ | ||
| } |
Check notice
Code scanning / CodeQL
Futile conditional
# Conflicts: # Src/Common/BCMenu.cpp # Src/Common/MessageBoxDialog.cpp # Src/Common/SuperComboBox.cpp # Src/OpenFrm.cpp
# Conflicts: # Externals/crystaledit/Sample/resource.h # Externals/crystaledit/editlib/ccrystaltextview.cpp # Externals/crystaledit/editlib/ccrystaltextview.h # Externals/freeimage # Externals/sevenzip # Externals/winimerge # Src/DirView.h # Src/EditorFilepathBar.cpp # Src/MainFrm.cpp # Src/MainFrm.h # Src/Merge.h # Src/Merge.vcxproj # Src/Merge.vcxproj.filters # Src/OpenFrm.cpp # Src/OpenView.cpp # Testing/FolderCompare/FolderCompare.vcxproj.filters
AnthonySWest
reviewed
Dec 9, 2025
| /* File created by MIDL compiler version 7.00.0555 */ | ||
| /* at Tue May 07 08:06:27 2024 | ||
| /* File created by MIDL compiler version 8.01.0628 */ | ||
| /* at Tue Jan 19 12:14:07 2038 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.