13,196 questions
0
votes
0
answers
53
views
Bug in `CopyAcceleratorTable` from `winuser.h` on 64-bit?
I am experiencing a weird bug in the function CopyAcceleratorTable when compiled for 64 bit (CopyAcceleratorTable).
I have two accelerator tables (from two dlls) which I want to concatenate into a ...
0
votes
0
answers
39
views
dynamically splitting window in mfc
How to implement dynamic splitting in mfc. Once we created splitting window during frame creation. Is it possible to change dynamically after sometime i.e., Using buttons ca we change 1x2 -> 2x1 ...
0
votes
0
answers
90
views
Passing any number of parameters as a parameter [duplicate]
I have a problem passing parameters from one function to another.
I have a function ifOkay(), it takes any number of parameters. I want to pass all these parameters to the ConvertFmtToCString() ...
1
vote
0
answers
78
views
CUDA 12.8 causes #error: MFC requires use of Winsock2.h in MFC project, but works fine with CUDA 12.4
I'm working on a Windows MFC GUI application that uses CUDA for high-performance image processing.
Previously, I was using CUDA 12.0 on a system with an RTX 3090 (Ampere), and everything compiled and ...
0
votes
0
answers
97
views
Determine Languages defined in .rc file in C++ MFC project
I have inherited some really old MFC code and need to add some additional functionality. I have figured out how to manually set the language- and due to items beyond my control- I am defining the ...
0
votes
0
answers
34
views
How to have two different components both using Microsoft Detours to detour the same function?
DarkTaskDialog is an excellent way to support a dark version of the task dialog in a MFC project. Example from the documentation:
I have added support for dark mode to about 95% of controls in my MFC ...
3
votes
0
answers
63
views
How to Determine OneDrive or SharePoint Directory Using SHGetPropertyStoreFromParsingName
Question:
I have been using PowerShell to check the Available Status of a file in OneDrive or SharePoint directories using Shell32.dll. Previously, the GetDetailsOf function returned Available Status ...
0
votes
0
answers
47
views
Microsoft Resource Compiler assigns different IDs for StringTable resources than what is given in Resource.h and the .rc file?
I'm converting what were formerly separate DLL and EXE modules of an MFC application (that is itself based on combining two disparate codebases) into static library (LIB) projects. I took steps to ...
2
votes
1
answer
73
views
How to glue COM server to methods in C++
I have a lot of experience in C++ but am new to COM, MFC and MIDL. I'm trying to create a 32 bit COM server from an IDL file supplied by a third party. The IDL section looks like this:
[uuid(3CA6AC95-...
0
votes
0
answers
76
views
Hosting a WPF control in a native MFC Dialog C++ application
I would like to host a WPF control in a MFC Dialog application. I am following the chapter 7.4.1 (Using a mixed-mode extension DLL) instructions mentioned in book (C++/CLI in Action by NISHANT ...
-1
votes
1
answer
99
views
Is using ODBC {CALL} to a SQL Server stored-procedure safe from SQL injection?
I am responsible for securing an old Windows C++ project. It uses the MFC ODBC CDatabase class to interface with SQL-Server. All DB query and insert operations are done using parameterized stored-...
1
vote
0
answers
41
views
Can I stop the property grid control from keeping the item selected (when tabbing) or override colour?
I use the SetCustomColors function to set the colours of my CMFCPropertyGridCtrl object when in dark mode.
However, when you tab off to another control in dialog, the last row remains selected. This ...
1
vote
1
answer
57
views
Setting colour properties of Date / Time Picker in MFC
Create a Dialog project and:
add a Date / Time picker to the dialog
map it to a control
override OnInitDialog
In OnInitDialog do the following:
SetWindowTheme(m_Date.GetSafeHwnd(), L" ", L&...
3
votes
0
answers
49
views
Ensuring one instance of a Doc/View exists
Is there a way in a MDI application to see if an instance of a doc/view already exists?
I can create an instance from a menu command, but I want to ensure that only 1 instance ever exists at any time.
...
1
vote
1
answer
70
views
How to change the colours of a CMFCPropertySheetTabCtrl inside a CMFCPropertySheet
I derived CMFCPropertySheet class from and overrode the OnInitDialog function:
BOOL CDarkModeMFCPropertySheet::OnInitDialog()
{
BOOL bResult = CMFCPropertySheet::OnInitDialog();
if (...