All Questions
1,464 questions
0
votes
0
answers
141
views
Dark Mode Task Dialog
I am aware that there is a GitHub repository for using a Dark Mode Task Dialog. THis is the sample from that webpage:
It uses Microsoft Detours, which is no longer available as a NuGet Package and ...
0
votes
0
answers
127
views
How to detect currently active chrome profile in a Chrome window [C++]?
I need to determine if a Chrome window is active (in focus/opened/maximized) which is the chrome profile that is currently in use for that window within a MFC C++ application.
I have managed to detect ...
1
vote
0
answers
46
views
How do I prevent my Control from auto-scaling when receiving the WM_DPICHANGED_BEFOREPARENT and WM_DPICHANGED_AFTERPARENT messages?
I added a manifest like this.
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
...
0
votes
1
answer
266
views
Is possible to get windows default dialog font (MS Shell Dlg) and change its attributes, e.g. bold?
I want to make header (CHeaderCtrl) of CListCtrl bold. I dont want to develop my own font, because I want to respect system default font, which is on each computer different. I want only make default ...
2
votes
2
answers
140
views
When calling CWnd::GetDC() returns a nullptr, will CWnd::ReleaseDC() need to be called with the nullptr as the argument?
When you have a class object derived from CWnd and you call object.GetDC(), but it returns a nullptr, do you still need to call object.releaseDC() with the nullptr?
I have a function that calls GetDC ...
2
votes
0
answers
127
views
signature verification issue with crypt32.dll CryptMsgControl api
We have an application which transfer EDI documents using AS2 protocol where When we send data to one of our business partner and try to verify the signature of the MDN that business partner return to ...
5
votes
1
answer
242
views
How to show arrow in split header of CListCtrl permanently
I have a CListCtrl and modify the header of it like split header with arrow which allow to choose from menu items:
CHeaderCtrl* pHeaderCtrl = m_cTree.GetHeaderCtrl();
if (pHeaderCtrl)
{
//BOOL bb =...
0
votes
1
answer
114
views
Win32 copy files without replacement
I am currently using this answer to copy a directory in my code:
https://stackoverflow.com/a/11483739/14296133
I ran into an issue that this copies and replaces all the files with the same name. For ...
1
vote
1
answer
67
views
Non-Modal WPF control hosted in MFC Dialog does not receive keyboard input
To modernize an older C++/CLI MFC-based application we are trying to replace an old dialog with a new one written in C#/WPF. To host the WPF control inside a CDialog we have followed this guide ...
4
votes
1
answer
128
views
Date and Time Picker Control with DTS_SHOWNONE style has huge oversized checkbox
My C++ application contains standard Date and Time Picker Control with DTS_SHOWNONE style in UI. When app works on Windows 11 the control renders none checkbox blurry and oversized.
I've created the ...
1
vote
1
answer
60
views
MFC: rect provided to EM_REQUESTRESIZE cuts off text?
As I understood it, setting up ENM_REQUESTRESIZE would issue EN_REQUESTRESIZE to change the height (but not the width) per this article.
However, I found the call was changing the height and width. ...
1
vote
1
answer
60
views
MFC: How do you get the page orientation in OnPreparePrinting() prior to calling base class?
I need to determine if the print will be Landscape or Portrait in the CViews' OnPreparePrinting() function before calling the base class.
I tried a couple ways, one works except the first call, the ...
2
votes
2
answers
139
views
I want to detect who causes a WM_COMMAND to be fired?
Background: I have an application with context menu, normal menu and accelerator.
I have a paste command and in case the context menu was opened with the mouse, the paste operation should use the ...
0
votes
0
answers
99
views
CreateDialogIndirectParam causes atom leak in MFC application?
I have an MFC Application where I added a common shared non-MFC library routine that displays a dialog with CreateDialogIndirectParam(). However, using deleaker I now see each time it is called, ...
0
votes
1
answer
99
views
Default STATIC control height is 8 (dialog units) and text fits, but DrawText() DT_CALCRECT says it's too small?
Inside a dialog, I checked a STATIC control that was created using a default height of 8 dialog units in the resource editor. The text looks fine.
However, if I check the required text height with ...